brianrich Posted April 20, 2006 Posted April 20, 2006 In Filemaker 7, is it possible to construct a function that will work like the Set Field script step but allows you to set the Nth repetition of a repeating field, where N is a value from another field or a calculation? For example the function might be Set FieldRep(repField;index;newValue) where repField is the repeating field, index is a number which points to the required repatition, and newvalue is the value to insert in the required repetition) The only way I have been able to mange this so far is to go to a layout where the variable is displayed, get the value I want to enter in the repetition into the clipboard, use a looping script to skip down the repetitions until I get to the one I want and then paste. A bit clunky... Any help or suggestions greatly appreciated. Brian Rich ruralnet|uk
comment Posted April 20, 2006 Posted April 20, 2006 Functions do not set fields. Functions are used in calculations, were they return a result calulated from the function's parameters. It doesn't matter how you calculate your index (N). Custom function or not, the Set Field[] step in version 7 will not accept a calculated result to specify the repetition to set. You might want to consider upgrading to version 8, where this is possible. Or change your structure and use related records instead of repeating fields.
brianrich Posted April 20, 2006 Author Posted April 20, 2006 Thanks for that information. I was aware that this could be done with Filemaker 8, it's just that we probably won't get there for a while yet. -(
Recommended Posts
This topic is 6791 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