Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6773 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

This is explained in the help, under Set Variable script step:

"Repetition is the repetition (index) number of the variable you want to create."

Posted

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

Posted

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]

Posted

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.

This topic is 6773 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.