Jump to content

$variable[1]


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

Recommended Posts

I recently looked at SeedCodes new calender and it got me to thinking. Variables can be powerful and it reminded me of a project I did written in Lua using lua tables. I guess my questions are, is there any good documentation on Filemaker's variables? Can you set a specific index for a variable ($var[1], $var[2], similar to a lua table)? Is there a limit to the length that a variable can be?

This could be used to do some amazing things (SeedCodes Calender is pretty amazing but have not pulled apart the free copy yet) but do not yet have a full understanding of how variablies behave in this context.

I hope at least part of this makes sense.

Link to comment
Share on other sites

is there any good documentation on Filemaker's variables?

http://www.filemaker.com/help/html/scripts_ref1.36.15.html#1044136

Can you set a specific index for a variable ($var[1], $var[2], similar to a lua table)?

Yes, you can use specific indexes. Assign to $var[index] at will. The indexes are treated as FileMaker repetitions. Unlike FileMaker field repetitions, you don't need to allocate/setup these variable indexes or repetitions in advance of using them.

Is there a limit to the length that a variable can be?

Do you mean the length of the variable name or the length of the variable's value?

The variable name has the same naming restrictions as a FileMaker field name (max length is 100 characters).

As far as I know the variable's value has the same limits as a text field.

Edited by Guest
Link to comment
Share on other sites

Keep in mind though that the variable repetitions are not true arrays.

Meaning what? They are sparse arrays, you can have $var[1] and $var[21] and $var[102] and $var[-64] with no other values. But what do you mean?

Link to comment
Share on other sites

This topic is 5164 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.