cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP IRPA array variable switch

ITUSER
Explorer
0 Likes
1,387

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

View Entire Topic
ITUSER
Explorer
0 Likes

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:

capture.png

Do you know an alternative ?

Théo