Page 1 of 1

clear content in fields

Posted: Tue Jan 26, 2010 5:58 pm
by bsouthuk
Hi

Wonder if somebody can help...

I have a button on a stack that when its pressed it deletes all content in certain fields. There are around 60 fields that I need content deleted when the button is pressed and at the moment I have the simple put "" into field "field" for each field.

Is there a way I can code the button so it puts "" into all fields within a group so its quicker and easier for me to maintain?

Cheers

Daniel

Re: clear content in fields

Posted: Tue Jan 26, 2010 6:24 pm
by Klaus
Hi Daniel,

you can loop through the fields like this:

Code: Select all

...
put the num of flds of grp "Your group here" into num_fields
lock screen
repeat with i = 1 to num_fields
   put empty into fld i of grp "Your group here"
end repeat
unlock screen
...
Best

Klaus

Re: clear content in fields

Posted: Tue Jan 26, 2010 6:29 pm
by bsouthuk
Excellent - thank you very much.

Daniel