on ‎2021 Nov 22 2:28 PM
Hello,
I want to sort an array of dates in SAP IRPA, but I did not find a way to switch variables in my array when a date is prior to another one.
I tried using set variable value activity, but it is not possible to access my array at a certain index (array[index] "is not an alphanumeric value or underscore").
I also thought about using add value to list, but it adds at the end of the list and not at an expected index.
Finally, I tried a basic JS customed script, but it fails to assign values to my declared structure data type, as it is (supposedly) a constant value..
thanks for helping,
Théo
Request clarification before answering.
Hello Sandeep,
Thank you for your answer, but my array is imported in the script as an input value, do you know if it is like a pointer to this array ? or just a local copy in the script ? because in this case I would have to return the sorted array to replace the original, but set variable value activity does not support this action:

Do you know an alternative ?
Théo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.