Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
vedus
- Livecode Opensource Backer

- Posts: 153
- Joined: Tue Feb 26, 2013 9:23 am
Post
by vedus » Mon Dec 02, 2013 6:00 pm
it is possible to empty all the fields in the card without need to do for every one fld?
Code: Select all
put empty into fld "1"
put empty into fld "2"
....
i have look in the forum but i don't find anything similar to this "field & empty is common worlds for search:

thank you
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Mon Dec 02, 2013 6:16 pm
Hi,
Assuming that you only want to empty editable fields:
Code: Select all
repeat with x = 1 to number of fields
if not the lockText of fld x then
put empty into fld x
end if
end repeat
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
bangkok
- VIP Livecode Opensource Backer

- Posts: 937
- Joined: Fri Aug 15, 2008 7:15 am
Post
by bangkok » Mon Dec 02, 2013 6:21 pm
Or could use a custom property (via the object inspector), leaving the possibility to have both, fields to be erased and fields content to be kept.
Code: Select all
repeat with i = 1 to the number of flds of this cd
if the toBeErased of fld i is true then put empty into fld i
end repeat
-
vedus
- Livecode Opensource Backer

- Posts: 153
- Joined: Tue Feb 26, 2013 9:23 am
Post
by vedus » Tue Dec 03, 2013 1:57 pm
Mark wrote:Hi,
Assuming that you only want to empty editable fields:
Code: Select all
repeat with x = 1 to number of fields
if not the lockText of fld x then
put empty into fld x
end if
end repeat
Kind regards,
Mark
thank you mark,that fixed my problem
