Sorting a list generated by a Micro Flow

0
I am generating a list using a Microflow and want to sort it, highest to lowest on the result of two attributes of the list being subtracted from each other. e.g The list returns a list of Assets that have exceeded their design life i.e. Design_Life > Actual_Life I want to sort highest to lowest  on the result of Actual_Life – Design_Life. The only way I can see to do this is create an additional attribute in this entity to store the result of this calculation and sort on it. Any better ideas would be much appreciated.  
asked
2 answers
1

The only workaround I can think of is creating non persistent objects where you create that extra attribute and copy the whole lot over. Then show the NP objects to the end user in the right sort. But if you need to interact with those objects it creates an extra layer of complexity because you then have to find the corresponding object again from the non persistent version. 

Regards,

Ronald

 

answered
0

I think calculating and storing the value as an attribute makes sense, and that is how I would have approached it.

Is there any reason you don’t want to do this?

answered