Jump to content
Sign in to follow this  
Fran_g

Clearing all repetitions of repeating field

Recommended Posts

I have a repeating container field that is used on my layouts to "highlight" whichever layout the user is on (the change layout script sets a graphic into the relevant repetition). I have attached a small file showing the setup.

The repetitions are cleared at the start of every change layout script (there are only 3 layouts at present so this is done by 3 steps, clearing each of the 3 repetitions individually) before the new layout highlight repetition is set.

The number of layouts in the file will need to increase and I don't want to keep adding individual steps to clear each repetition in turn.

I have tried to do this in one script step using Extend and Get(CalculationRepetitionNumber) - unsuccessfully.

What calculation/script step do I need to clear all repetitions of a global container field without specifying each one individually?

Thanks for any help in advance.

Changelayout.zip

Share this post


Link to post
Share on other sites

You can't do it that way; you need a looping script.

That's the value of value of variables.

Set Variable [ $max; Value:3 ]

Set Variable [ $n; Value:1 ]

Loop

Exit Loop If [ $n > $max ]

Set Field [ Changelayout::g_Button_hilight[$n]; "" ]

Set Variable [ $n; Value:1 + $n ]

End Loop

Changelayout.fp7.zip

Edited by Guest

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.