Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any Method code SETFLDSTATE for Default Values
Message
 
To
09/03/2001 07:44:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482731
Message ID:
00484301
Views:
11
Gary,
I think I see what I missed earlier. If I were doing this I'd check

GetFldState(-1)

first. This gives you a string with a character for each field. You can check for "4" in the string and match the position in the string with your call to SetFldState(). Note that the first character in the GetFldState(-1) string shows if the record is deleted.

HTH
Barbara


>Barbara,
>
>I understand that setfldstate() will be the command that sets the field states to 3 for the fields that have default values. I was hoping someone had faced this problem and had written code to scan all the fields in a view/table that had default values defined and on those fields used setfldstate to set them from 4 to 3 for the reasons I've mentioned. The framework "cancel" button refers to the common logic that is called when any of the fillowing occurs: the canel button on a form is used to exit an add record process, attempts to close the form, or move onto another record. The framework in all these cases executes code to determine if the current appended record has had any changes make to it. If so, it prompts "Save Changes". I don't want this prompt if the only changes made to the appended record are from default values being applied. I have concluded my best approach, after a new record is appended, is to just loop through all the fields and set them with setfldstate.
>
>Thank you for offering a helping hand. It is appreciated.
>
>Gary.
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform