Forum Academy Marketplace Showcase Pricing Features

Sort/Filter a RG based on an Expression not a Field

I’ve been building a rate/cost comparison app for payments, I thought I had it all figured out but the data and workflow structure gave me the Total Cost as an Expression (not a field) in the RG. And it is my understanding (after reading different posts on the forum) that it is difficult to sort/filter an RG if it’s not a field.

Here is what I have:
Input: User answers 4 questions, each answer will generate a number (Sales, # of Transactions, etc.)

Providers: There are 30-40 Providers

Payment Plans: Each Provider can have multiple Payment Plans and each Payment Plan will include a breakdown of rates, fees, and cost.

Payment Plan Type: There are two different types of Payment Plans, Type 1, and Type 2. These are calculated in two different ways.

Current structure:
Data Type: Providers
Fields: Name (Provider)
Payment Plan Type
Payment Plan Name
Rate 1
Rate 2

Fee 1
Fee 2

I’m calculating everything (both payment plan types) in the RG with the User’s input and the data (fees & rates) from each Provider and using conditions to show Type 1 or Type 2.

The RG will show Name (Field) Logo (Field) and Total Cost (Expression) and a full breakdown of Rates, Fees, and Costs are showed in a popup from the RG.

This structure works but the problem is that I can’t find a way to sort Total Cost, which makes a comparison app pretty useless😩

Any guidance in the right direction is highly appreciated.


My List Shifter plugin offers mapped sorting like this. See: Sorting according to a Thing's Thing field

1 Like

Hi @keith, Thank you for your response. I have implemented your plugin on my page and used your demo “Houses & Paints” as a template. The difference between what I’m trying to do and your demo is that I’m trying to sort a text element (number) that is linked to an expression inside the RG. In other words, these numbers are not saved anywhere. In your demo, the “popularity” number is saved in the database, right? Am I missing something or can the plugin sort based on variables and not saved data? Sorry if I did a poor job explaining this before. Thanks again.

1 Like

No, popularity is computed in the page using Process List.