This is a known issue. See this and other posts about "variable repetitions":
The work around is to set the variable with Let().
Sent from miPhone
Thank you beverly.
Question on this useage:
I am have used arrays in other apps where you would define the array as containing xx values and then Array(x) to use one of those values.
FileMaker's repeating fields and variables seems to work similarly except that the $$array[value] seems to work more like a link to a related table rather than a predetermined array as I described above.
Your example seems to show that the $$array[element] is not a sequential thing nor does it need to be declared. It is however interesting in that items 1, 400, 33455443 do not create an array of 33455443 elements but of 3.
If I am correct in this then FileMaker's repeating arrays are relational arrays rather than dimmed (fixed number) arrays. Cool...
What's next from FileMaker? Artificial Intelligence?
Aha! This solves a question I had uses EXIF. I will have to test this but it might work like this
Table with exif number and label value fields.
$$ExifLabel[nbr] = value field
This might eliminate the painful grinding of 100 ifs. (Death by 100 Ifs, a movie by...)
More to do for BigTom's one line sql statement!