Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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

Posted

I'd rather go down the repetitions, then

if status(CurrentRepetition)=Desired Index

set the value

Posted

Man, It's not my fault. I'm working on a database created by someone else, who apparently knew nothing about data modeling or relational database theory. Thanx you all for responces, BTW.

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