Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

I am trying to create a script that sets a repeating field. I first need to clear the field (all repetitions). I know I can select go to field and pick the repetition manually, in which case I will need 25 set field script steps for all 25 repetitions. I know there must be a way to do a calculation that will take me to the next repetition. I am trying to figure out how to do it with the Get(ActiveRepetitionNumber) but I can't get my head around it. Can someone help?

Thanks

Posted

I had a similar problem several months ago and, sorry to say, ended up with having to use n set field steps to clear n repetitions of a repeating field.

Posted

Put your repeating field with all repetitions displayed on a layout with at least one other field. Then

Go to Layout [repclear]

Go to Field [repfield]

Loop

Set Field [ , ""]

Go to Next Field

Exit Loop If [Get(ActiveFieldName) <> "repfield"]

End Loop

Substitute your field name for repfield and don't specify a field in the Set Field step, only the null result.

Posted

Or lookup an empty global repeating field with same number of reps, using a relationship gID :: ID.

Anytime you'd change the gID field, this would cause a relookup to the current record.

Set the Lookup Options to not copy if no match/empty wink.gif.

Of course, this doesn't work to reset a global repeating field.

Posted

Much better to solve the real problem and get rid of the repeats. They are tempting for novices but are almost always a source of trouble, as opposed to a real relational design.

This topic is 7319 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
×
×
  • Create New...

Important Information

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