July 9, 200619 yr Hi, Just getting into FM 8. Some really nice changes. I love variables, but I'm confused on one point and the documentation is of no help. In the SetVariable dialog box there is a field for repetition. Does this mean the variable can be repeating? If so, this really makes it a very useful thing in that you can create arrays. But I can't seem to make it work this way... Or does this refer to the repetion number of a field that you are using to set the value of the variable? If this is the case it seems like this could be accomplished with the getRepetition() function, and is a lot less useful. Any clarity anyone can provide will be most appriciated. Thanks, Dan
July 9, 200619 yr This is explained in the help, under Set Variable script step: "Repetition is the repetition (index) number of the variable you want to create."
July 9, 200619 yr Author Thanks. That's what it seemed to be indicating. I guess I'm doing something wrong then. For example if I create a script: Set Variable [$$RepeatingVar ; Value: "A"] Set Variable [$$RepeatingVar [2] ; Value: "B"] Show Custom Dialog[ GetRepetition($$RepeatingVar;1) & ", " & GetRepetition($$RepeatingVar;2) ] The dialog box returns A, A. Why isn't it returning A, B? Thanks, Dan
July 9, 200619 yr GetRepetition() expects a repeating FIELD as the first argument - so I am surprised it returns anything with a variable. However, this syntax works: $$RepeatingVar[2]
July 9, 200619 yr Author Thanks. That's what the documentation never gets around to -- how to access the data. Dan
July 9, 200619 yr Yes. But I am afraid you won't find repeating variables very useful. They do not behave like repeating fields. For example, there doesn't seem to be a way to add, or multiply, 2 repeating variables in a single step.
Create an account or sign in to comment