OriginalPostID-133670
Discussion posts and replies are publicly visible
I know this is an old question but for anyone searching now or in the future it is possible to do this without using a plugin
This is what I've done
tointeger( todatasubset( a!forEach( items: ri!array, expression: { value: fv!item } ), a!pagingInfo( startIndex: 1, batchSize: - 1, sort: a!sortInfo( field: "value", ascending: rule!APN_replaceNull(ri!ascending,true) ) ) ).data.value )
First it casts an array of integers into an array of dictionaries and then it uses Appians sort functions to apply a sort. Finally it extracts the values into a new array.
The dictionary cast is necessary in order for the sort to understand what it is meant to order it by.
we can use sort() as well, this is much simpler and works fine with all appian primitive types.
sort({3,2,1}) // returns 1,2,3
Thats not listed in the Appian functions documentation or the functions recipe page. Are you sure thats not a plugin?https://docs.appian.com/suite/help/19.2/Appian_Functions.htmlhttps://docs.appian.com/suite/help/19.2/Function_Recipes.html
It's not; sort() is a hidden function. It's not documented, so Appian has the option of deprecating or removing it whenever they want. This also comes with a recommendation to avoid its use specifically because it's not documented.
Ah I see.
That sounds like an extremely good reason to not use it.