clear fields -- a faster way

Malte Brill revolution at derbrill.de
Mon Jun 6 14:24:14 EDT 2005


Hi Bill,

 >I want to clear fields like this:

  >repeat for each field tField in card "DocApplication" of stack
 >"CustomForms"
  >  put empty into tField
 >end repeat

 >but I keep getting the error "bad terminator" -- what am I doing wrong?


As written before repeat for each does only work for chunk expressions. 
It also only makes sense if you got *really* many fields (100+)
If you urgently want to use repeat for each you can store the ID of all 
fields to be cleared in a custom property, each ID on a line in the 
cProp and do it this way:

repeat for each line theFieldToBeCleared in the cAllFields of this cd
   put empty into fld theFieldToBeCleared
end repeat


Cheers,

Malte




More information about the use-livecode mailing list