Rank values in a datalist/datamaster
Do anyone have a prototype that can assign rank values to a data master/datalist?
For example, I have 2 columns (Value, Rank). I want to be able to assign values to the Rank column starting with 1 after sorting the list by value from greatest to lowest, so that the greatest value is assigned to rank 1, second, to rank 2, etc.
I figured out how to assign incremental value by row at onpageload however, the current method only works with onpageload and nothing else (see attached). Is there any way to sort datalist prior to onpageload or add incremental values after sorting? I was thinking possibly assigning the sorted values to a separate datamaster and link to another screen so it can be sorted before onpageload but I can't figure out a way to properly export sorted datalist values to a datamaster (I tried doing currentrow.value but it only exported the last row and attribute didn't work).
I need a way to assign ranking AFTER values are sorted, not 'Before'.