@Anonymous Thanks for using Microsoft Q&A.
Have you defined the variable "i" as a string ? Please try casting your variable to int in your activity e.g. @activity('LookupRes').output.value[int(variables('i'))].
ARRAY index problem. Array can only be selected using an integer index
Hi, I am trying to pass a file name to a store procedure from a lookup into a ForEach.
But I am getting the following error
The expression 'activity('LookupRes').output.value[variables('i')]' cannot be evaluated because property '4' cannot be selected. Array elements can only be selected using an integer index.
in my SP I have an expression as
@activity('LookupRes').output.value[variables('i')]
Increment J = @ hide (add(int(variables('i')), 1))
Set I = @variables('j')
That is how I am trying to get the index for my lookup
@activity('LookupRes').output.value[variables('i')]
But its not working.
Any suggestions?
Thanks
1 answer
Sort by: Most helpful
-
Saurabh Sharma 23,816 Reputation points Microsoft Employee
2020-12-09T16:53:23.007+00:00