Jump to content
Sign in to follow this  
ace_bird_dog

Setting a global field from a repeating field

Recommended Posts

After reviewing many posts here, I now understand the limitations to using repeating fields, I'll know better next time. I have been banging my head against my monitor all day trying to figure this out, please help.

I have three repeating fields that represent information about a product: Item #, description and color. I need a global field to display what the Item # is for that line regardless if the current active field is Item #, description OR color.

Thanks a ton.

global_repeating.jpg

Share this post


Link to post
Share on other sites

You can't do this with a global, unless you put transparent buttons over each repetition that trigger a script to set it with the current repetition's item number. In this case you would need 15 scripts, one for each field, to

Set Field [global, GetRepetition( Item#, {therep} )]

Go to Field [whateverfield-{therep}]

where {therep} is the hard-coded number for that repetition.

This will require disallowing access to the field, which means you will only be able to click on a button to enter a particular field's repetition and not tab through them.

Share this post


Link to post
Share on other sites

I had that as a test scenario but ultimately ruled it out for being too ugly and I need tab access to the fields for data entry. In the real database, I have 30 repetitions of the fields so I'd need 90 scripts. If I were to use something other than a global, would that work?

Share this post


Link to post
Share on other sites

Nope. A calculation using Status(CurrentRepetitionNumber) wouldn't recalculate until you exited the record, so it would be useless. Your best option is to convert your repeating field solution to a relational one.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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