Jump to content

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

Recommended Posts

Posted

What is the synthax to access elements of repeating fields other than the first in formulas? Do I understand corretly that field name alone of the repeating field returns the first element? How od I access the other ones?

Thank you.

-ilya

Posted

Hi Ilya,

Reading a value from a repeating field is simple; the syntax is

GetRepetition(field name, repetition)

So if you want to read the 3rd value of a repeating field called PhoneNumber the expression would be GetRepetition( PhoneNumber, 3)

Note that you can use another field as index to read from a repeating field; the expression in the Phonenumber example would then become

GetRepetition (PhoneNumber, MyIndex)

Unfortunately there is no way to write to a repeating field that way. If you want to make a script that populates the PhoneNumber field with a list of phonenumbers you would have to use a 'set field' script step for every repetition that you want to write a value to. This would look like:

set field [ PhoneNumber -1, FirstValue]

set field [ PhoneNumber -2, SecondValue]

set field [ PhoneNumber -3, ThirdValue]

:

:

set field [ PhoneNumber -n, NthValue]

In other words, the repetition that you want to set can not be defined via another indexing field.

I'm sure that if you do a search on this forum on the expression 'Repeating Field' that you'll find lots of heated debates whether Repeating fields are actually a usefull feature of Filemaker or miserable remainders of early Filemaker versions.

Hope this helps,

Regards,

Ernst.

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