Jump to content

Index for a Repeating field


brianrich
 Share

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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5707 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.