Nest the text element into a group of type number (an easy way is just to right click on the text element and choose the command “group elements in a group”).
Write the same expression that the current text element has as a data source for the nesting group of type content “number”.
Set the text element to display parent group’s value so that the content of the parent group can be displayed by the text element.
You now can use that group’s number value for math and likely … sorting purposes.
Hey @cmarchan
I have grouped the text element and created the data source for the text content but now I am a little stumped as to how I can now use that groups number value for sorting purposes. Ive explored the :sorted parameter and seeing if I can use that groups’s value via the dynamic field option but it doesn’t appear. Any thoughts on how I can use that groups number value?
I don’t believe this is doable (sorting on a calculated value) without the use of a plugin. If you do some searching on the forum you’ll see some other threads on this and a couple of plugins people use.
@ed727 I believe you are right. @stuart.warren1 my suggestion was geared to enable you to use the result of that expression in a viable way where possible in your app. It was “trapped” inside the text element. Now it is not.
To sort the RG you will likely need to store that value in a number field of the RG’s data source thing.
Or pre calculate it prior to displaying it in the rg.