November 9, 200421 yr 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
November 9, 200421 yr 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.
November 9, 200421 yr 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.
November 9, 200421 yr 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 . Of course, this doesn't work to reset a global repeating field.
November 12, 200421 yr 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.
Create an account or sign in to comment