Page 1 of 1

fields changed ?

Posted: Mon Jan 13, 2014 1:55 pm
by link76
Hello,
I have a card with many fields and Option menu, I would like to check if they are changed on the close card. :roll: ??

Code: Select all

on closeCard
..... check changed field .....
end closeCard

thank you 


Re: fields changed ?

Posted: Mon Jan 13, 2014 2:04 pm
by Klaus
Hi,

this obviously requires that you store the content of all your fields "on opencard" for later comparison!
So I would rather "trap" the "closefield" handler(s) of your fields.


Best

Klaus

Re: fields changed ?

Posted: Mon Jan 13, 2014 2:39 pm
by link76
Klaus wrote:Hi,

this obviously requires that you store the content of all your fields "on opencard" for later comparison!
So I would rather "trap" the "closefield" handler(s) of your fields.


Best

Klaus
thank you!
how can I read all fileds on open card?

Code: Select all

put field "text1" into tFld1
put field "text2" into tFld2
put field "text3" into tFld3
a fast method?

Re: fields changed ?

Posted: Mon Jan 13, 2014 2:48 pm
by Klaus
As long as you do not have > 100 fields on a card, every method to collect the data should be fast enough! :D

Re: fields changed ?

Posted: Mon Jan 13, 2014 7:25 pm
by jacque
If you only want to know if the fields have changed, but you don't care what the actual text changes are, then I like Klaus' first idea best. Just set a variable (global, or script local) on closeField. Then all you need to do on closeCard is check the variable and see what it contains.

If you do need to know the actual changed text then yes, you'd need to do it the second way and scan all the fields.