Page 1 of 1

HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT

Posted: Thu Aug 14, 2008 3:57 pm
by RAMESHBABU
Hi Friends

I have a multiline get. I want save the value to database only when the
get value is changed.

How can I know wether the get value is updated or not.

Thanks

- Ramesh Babu P

Re: HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT

Posted: Thu Aug 14, 2008 4:38 pm
by Enrico Maria Giordano
Can't you just compare the current value with the original one?

EMG

Posted: Thu Aug 14, 2008 5:15 pm
by RAMESHBABU
Mr.Enrico

Yes. But I was looking for a simplest way like clipper's ISUPDATED()
like functionality in Gets.

Thanks for your suggestion.

- Ramesh Babu P

Posted: Thu Aug 14, 2008 5:35 pm
by TecniSoftware
Can use on change:

Local lUpdated := .F.

DEFINE GET oGet ON CHANGE lUpDated := .T.



Regards / Saludos

Posted: Thu Aug 14, 2008 5:37 pm
by James Bott
You might try something like:

oGet:cargo:=.f.
oGet:bChange:= {|| oGet:cargo := .t. }

Then you can test for oGet:cargo to see if it is True.

James

Posted: Thu Aug 14, 2008 9:44 pm
by Enrico Maria Giordano
Unfortunately there are a couple of bugs that prevent ON CHANGE (and bChange that is the same) from working fine. Specifically, ESC wrongly activates ON CHANGE and Enter erroneously does not.

EMG