Recall the name of the variable

Hey guys,

I am stuck with a flow for a client and would really appreciate your help. So the flow contains multiple variables and their values are numbers.
So we want to rank the variables from highest to lowest and use the highest and second highest value in the rest of the flow. I have been able to calculate the highest and second highest value but I am stuck with the bleow:

The output of the sorting function only provides me with the variable value (which is numbers). Instead of that, I just want to recall the name of the variable. How do I map the highest value back to it’s variable name?


Instead of setting each variable separately why not create an array with the key value pairs and use the sort() function to sort them and then use the get() function to get the array element you want which will return the key and value.


That’s a good call @alex.newpath

I am already using the sort function to sort the array so I guess it’s just a matter of using the get() function now. Thanks! I will try that.

2nd this approach. :metal: @alex.newpath

1 Like