Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime of field change
Message
 
To
01/02/2007 04:40:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01191228
Message ID:
01191312
Views:
9
Hmmm....

I'm getting a syntax error when trying to place this into the expression builder for the table update trigger:

IF OldVal('ActiveUser') = .T. AND ActiveUser = .F.
REPLACE ActiveUserChg WITH DATETIME()
ENDIF

I've also tried adding RETURN .T. to the end, but still getting a syntax error

Thoughts?

>>I would like to do a simple (I hope) validation rule for a true-false field so that when the field is changed to false, the datetime is recorded.
>>
>>I thought it would be easy to set a validation rule for the logical field, but I'm missing something. Can anyone provide a simple example for me?
>>
>>TIA
>
>You can do that using row level validation (in designer I think it's under table tab). Something like:
>
>if isnull(oldval('myLogical')) # !isnull('myLogical') or oldval('myLogical') # myLogical
> replace myDatetime with datetime()
>endif
>
>However you can also do that directly at field validation in UI on a buffered table. If it is saved then saved with new date else old date stands (dependancy to UI).
>Cetin
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform