Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to getfldstate()
Message
 
To
20/05/1998 11:40:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00100525
Message ID:
00100605
Views:
61
>>>Jamuna,
>>>you could also use it in a method.
* Check for any change
>>>cStatus = chrtran(substr(getfldstate(-1),2),"13","") && First one delete flag
>>>lChangeInanyField = !empty(cStatus)
Cetin
>>
>>Thank you for your response. What is chrtran(substr(getfldstate(-1),2),"13","")
>>doing? Could you please explain a litle bit more? Thanks again for your time...
>>
>>Jamuna
>Hi Jamuna,
>
*getfldstate(-1) returns a string of numbers ranging from 1 to 4 for all fields.
>* Suppose you have a table with 5 fields
>* Edit fields 1,2,4
>? getfldstate(-1)  && would return "122121"
>* Append and change field 1,3
>? getfldstate(-1)  && would return "143433"
>* 1 and 3 mean it's not edited
>* or deletion status not changed (first one is delete flag)
>* 2 and 4 mean it's edited
>* or deletion status changed (first one is delete flag)
>* 1 and 2 are for existing records and 3 and 4 are for appended
>* Now with these
>? substr(getfldstate(-1),2) && Would return same info with first (delete flag) dropped
>? chrtran(substr(getfldstate(-1),2),"13","")
>* Would strip 1 and 3 from result leaving only 2 and 4 if any
>* We want to see if any edits were made
Cetin

Thank you so much. Really appreciate your help,

Jamuna
Previous
Reply
Map
View

Click here to load this message in the networking platform