Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining changed values in fields
Message
From
29/08/2003 15:19:33
 
 
To
29/08/2003 12:24:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00824599
Message ID:
00824681
Views:
24
Thanks Hilmar - figured out what I was doing wrong. Yup that is the way to go.
Gaylen

>>I have a form with many many fields. I use table buffering and tableupdate to commit the changes if a field value has been changed. Using getfldstate() I can determine if a field has had activity I need to determine which field has changed and the previous and new values are for use later.
>>
>>I am thinking of storing the old value in a form property from gotfocus() and new value in another form property from lostfocus() and then compare the results and storing in a table.
>>
>>I am looking for a more elegant way to do this without manually creating all those form properties.
>>
>>Thanks in advance for any suggestions.
>>Gaylen
>
>GetFldState() will tell you whether a field or fields has / have changed - even if it reverts to its old value.
>
>OldVal("MyField") will give you the value before the modification.
>
>CurVal("MyField") will fetch the value from disk again (this is in case another user made a change).
>
>Usually, you would compare MyField with OldVal("MyField"). For instance, I use this in triggers, to update another table.
Previous
Reply
Map
View

Click here to load this message in the networking platform