Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.
Thank you for your help!
Hi Saad,
Have you tried using a custom JavaScript function, this would be the only way you can currently do this as we do not support sorting variables in an array in the app with any in-built functions. Here is a link to EAC with details about using JS functions in the app, note this is still beta functionality:
https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&arttypeid={5a8e51ed-4a87-43fe-a67d-2b7829af130f}&artid={D2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3}
Here is an example pulldata() function you could use to get an array of all the values of a field from the repeat and pass it to a JS function:
pulldata("@javascript", "functions.js", "sumField", ${r1}, "r1_decimal")
Phil.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.