Function

Certified Associate Developer

What Is a function for showing array itoem in ascending or descending

  Discussion posts and replies are publicly visible

Parents
  • You can also use Sort Utilities plugin, only if you are okay with dependency on a custom plugin.

    However, I believe it is high time Appian should introduce OOTB documented version of the hidden sort() function, instead of forcing us to first convert the data into key value pairs and then use todatasubset and pagingInfo just to apply sorting to a list of numbers.

    Hidden sort() function:

  • Agreed. It would be good to see it evolved so that you could declare the desired sort order (right now you have to sort and then use fn!inverse() to get a descending-order result. Also being able to declare which item in, say, a map you want to sort by would be useful, as would nested sort orders (e.g. sort by A, then E, then C, then D in a map that had keys of A, B ,C D, E)

    Right now sort() if not officially supported so if you use it and there's an issue after, say, an upgrade, you won't get any support from Appian to address you issue.

Reply
  • Agreed. It would be good to see it evolved so that you could declare the desired sort order (right now you have to sort and then use fn!inverse() to get a descending-order result. Also being able to declare which item in, say, a map you want to sort by would be useful, as would nested sort orders (e.g. sort by A, then E, then C, then D in a map that had keys of A, B ,C D, E)

    Right now sort() if not officially supported so if you use it and there's an issue after, say, an upgrade, you won't get any support from Appian to address you issue.

Children