Link to home
Start Free TrialLog in
Avatar of comradec
comradec

asked on

Why does CLEAR_BLOCK(no_validate), still perform validation on the record?

Why does CLEAR_BLOCK(no_validate), still perform validation on the record, and force me to populate a field in the block with valid data ?

I assumed no_validate flushes the block without validating.

Any Ideas ?
Avatar of Helena Marková
Helena Marková
Flag of Slovakia image

I think that your item is a required item. Try set Defer Required Enforcement property (e.g. in a Pre-Form trigger):

Set_Form_Property(:SYSTEM.CURRENT_FORM,Defer_Required_Enforcement,Property_True);

When an item has Required set to Yes, and item-level validation is in effect, by default Form Builder will not allow navigation out of the item until a valid value is entered. To allow the end user to move freely among the items in the record, set the Defer Required Enforcement property to Yes.  This will postpone enforcement of the Required attribute from item validation to record validation.
Avatar of comradec
comradec

ASKER

Thats not the solution, thanks anyway.

Even with the item level Required property turned off, it still forces validation, when I press my 'Clear Fields' button, which in turn calls CLEAR_BLOCK(NO_VALIDATE).

It does, however, work fine if I 'exit_form(no_validate)' from a pop-up menu.

Any ideas ?

NO_VALIDATE should mean 'NO VALIDATE' !




Thats not the solution, thanks anyway.

Even with the item level Required property turned off, it still forces validation, when I press my 'Clear Fields' button, which in turn calls CLEAR_BLOCK(NO_VALIDATE).

It does, however, work fine if I 'exit_form(no_validate)' from a pop-up menu.

Any ideas ?

NO_VALIDATE should mean 'NO VALIDATE' !




Thats not the solution, thanks anyway.

Even with the item level Required property turned off, it still forces validation, when I press my 'Clear Fields' button, which in turn calls CLEAR_BLOCK(NO_VALIDATE).

It does, however, work fine if I 'exit_form(no_validate)' from a pop-up menu.

Any ideas ?

NO_VALIDATE should mean 'NO VALIDATE' !




Just a thought:  how many data blocks do you have?

If you have a master-detail relationship, I'm not sure the NO_VALIDATE will apply to the detail block when it is cleared from the relationship trigger.

Would CLEAR_FORM work for you?
I fixed it by moving the button into the same block to be cleared.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Henka
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of SpazMODic
SpazMODic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial