Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.

752
1
03-23-2019 01:36 PM
SaadRoustom
New Contributor

Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.

Thank you for your help! 

Tags (3)
0 Kudos
1 Reply
by Anonymous User
Not applicable

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&arttype...

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.

0 Kudos