Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect changes to a cell grid
Message
 
To
02/08/2000 09:23:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00399549
Message ID:
00399879
Views:
18
CurVal() tells you the value in the field on disk (that is it reflects changes any other users may have made while you were working on the record)

OldVal() tells you what your field started with in your buffer (that is what the value was before you made any changes to it)

Alias.FieldName refers to the field in your buffer (that is the value it has now in the buffer including the changes you may have made)

GetFldState() tells you if you have hcanged the field in your buffer or not.

Example:

Table named MyTable and field named MyField with a vlaue of "ABC"
* Open the table
USE MyTable
* Set buffering on
CURSORSETPROP("Buffering",5,"MyTable")

? MyTable.MyField  && Shows the ABC

REPLACE MyField WITH "XYZ"

? MyTable.MyField  && Shows XYZ
? OldVal("MyTable.MyField")  && Shows ABC

* Some other user changes MyField to MNO

? MyTable.MyField  && Shows XYZ
? OldVal("MyTable.MyField") && Shows ABC
? CurVal("MyTable.MyField")  && Shows MNO

? GetFldState("MyTable.MyField") && Shows 2 Field has been changed
? GetFldState("MyTable.SomeOtherField") && Shows 1 field has not changed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform