Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding last entered value in valid event, how to?
Message
From
08/06/2008 00:42:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01322235
Message ID:
01322351
Views:
14
>>>No but you can build such functionality into your control base class by adding a 'Lastvalue' property and populate it at appropriate time.
>>
>>Thanks!
>>Hard to believe VFP does not have this feature... anyway, I trust you :)
>
>I don't think that it is a common reqirement in applications.

Isn't inter-dependent input fileds is quite a common scenario?

E.g. I have several fields B, C and D whose valid value or valid range of values are field A dependent. Whenever user change field A value, I will need to determine whether to wipe the B, C and D's value (so that user will input again their valid values which now base on the new A). I want the wipe to be real smart that it is only done when necessary... comparing using OldVal() does not help if there are more than 1 time changes of A value before save:

Form load:
A = A1, B = B1, C = C1 and D = D1

User change 1: (The valid event of A wipes B, C and D, so force a re-enter of their values)
A to A2, then B = B2, C = C2 and D = D2

User change 2:
Click A, key in A3 for A, then change his/her mind, change A3 back to A2 and hit [Enter] to move on.
or
When picklist is involved, pick A3 for A, change his/her mind, pick A2 again for A and hit [Enter] to move on.

For "User change 1", the wipe can be determined correctly using oldval(), but for "User change 2", I will need a last entered value, with it (for the above example quoted) I can determine that the wipe should be skipped because user has not changed A.
Previous
Reply
Map
View

Click here to load this message in the networking platform