hioctane Posted June 3, 2003 Posted June 3, 2003 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
BobWeaver Posted June 3, 2003 Posted June 3, 2003 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.
cjaeger Posted June 4, 2003 Posted June 4, 2003 I'd rather go down the repetitions, then if status(CurrentRepetition)=Desired Index set the value
hioctane Posted June 4, 2003 Author Posted June 4, 2003 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now