Hi all i have declared a global vriable with 2 repetition,
set variable [$$arr[2];value:”9557878322″]
as i know i have declared it with 2 repetition so that it should store maximum two value but i dont know how to insert multiple value when we declare global variable with more then 1 repetition.
what i want : declare global variable with repetition 2
it will look like $$arr[2]
i want to insert two values so that arr1 refer first value and arr[2] refer 2nd value……
Here i have entered a snap where u can see thet i have declared repetition 2..
Thanks in advance.
If you’re happy using valuelists, then you don’t need a 2 repetition variable. Instead once you’ve set your $arr as you’ve shown in the screen shot, just use
to retrieve the the value at [index] (remembering that it will have a return attached), and
to set the first value, or
to set the second value.
HOWEVER, I suspect you might be better off altogether taking a look at Passing Named Parameters and Dictionary Functions which outline some useful tricks for storing values in dictionaries – there are a whole slew of custom functions that you’ll probably find useful for working with associative arrays in FileMaker.
You’re assignment in your dialog box might look something like:
and the values could be retrieved as
or
or reset using
The syntax of these new custom functions ( # , #? and #c ) takes a bit to get used to, but it may be the sort of things that you could use for this task, but which would also broaden how you use calcs in FileMaker in the future too. Or not 😉