Jump to content
Server Maintenance This Week. ×

Rep.Fields With Variable Index


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

Recommended Posts

Is there a way to store values in repeating fields using a variable index? All of the InsertXXX script steps require the me to put a constant index dictating the element of the field to insert into. I need FileMaker to decide at run time based on a value of a variable which element of the field to insert into. How do I do that? Thank you.

-ilya

Link to comment
Share on other sites

No, it would be nice if Filemaker had a SetRepetition() function to complement the GetRepetition function, but it doesn't. A messy workaround is to use the following script steps:


Set Field [gRepIndex, <<Desired Index No.>>]

Go to Field [TheRepeatingField]

Loop

  Exit Loop If [gRepIndex<=1]

  Go to Next Field

  Set Field [gRepIndex, gRepIndex-1]

End Loop

Insert Calculated Value [<<Desired Field Value>>]

The field has to be on the current layout, and all the field repetitions have to be in sequential tab order for this to work. You may want to create a special layout with only the repeating field on it.

I'm assuming that you are using repeating fields for some legitimate reason. grin.gif

Link to comment
Share on other sites

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