Rank Fields Within a Single Record

This one’s perplexing me…

I have a data type called “ages” which consists of 6 custom fields (“13-17,” “18-24,” etc). Each field represents a different age cohort and contains an integer which we obtain via API (e.g. “13-17” : 0.16000, “18-24” : 0.24001, etc). The “ages” records are associated to other upstream data types.

We would like to display the top 2 age cohorts to our users, but cannot rank the individual fields within a single “age” record. I can think of a few complex methods to overcome this, but ideally someone has a more elegant solution.

Appreciate it!

I would be looking at the “List Expression” element from the Toolbox.

You should be able to convert the 4 fields into a list of numbers.

Obviously having them as their own data type would work best, but assume because it is an API that is tricky. You could do the conversion with an API workflow I think.

Thanks a lot – I think this will work! Do you have any advice as to how I would pair the correct field names with the list of numbers once sorted?