Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TaxRi 'Beta'
Message
From
07/02/2002 13:36:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00616807
Message ID:
00616832
Views:
21
>Hi Hilmar,
>
>Just curious, do you know a way to disable record validations and field level validations, when replace statement is fired?

I don't use any of these - only triggers, and table-based validation called from a form.

>Basically, these are our validations:
>iif(vartype(oValid)<>"O",.f.,iif(oValid.nLocked=0,.t.,FieldRule()))
>So, if we want to disable them, we set oValid.nLocked to 0. However, still this portion of the code fires each time. Do you know a way to disable them completely?

The first thing that occurs to me is something like: oValid.nLocked = 0 OR FieldRule(). S.B.Evaluation should take care of not calling your field rule if .nLocked = 0.

However, for the more complicated expression you posted above, you may want to use a function that accepts a string representing a validation rule, and evaluates it. Under certain conditions, the function may simply return .T., to bypass validation.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform