Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime of field change
Message
 
À
01/02/2007 04:40:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Divers
Thread ID:
01191228
Message ID:
01191312
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform