Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Validation not firing

All

I have a close button that on Submit in pre save sets the status to Close 1.  I want a validation rule on a text field called phone number that says if status is Close1 and type is Desk phone then phone number is required.  However, the validation doesn't fire.  I think it is because status is being set in pre save and the validation code for Phone number has already happened and the conditions are not met.  Does anyone have any idea how I can get the form to validate the phone number before the item is set to close?

Thanks

Jennifer

DavisA has reacted to this post.
DavisA

Instead of the pre-save, I would try having the status field on the form, hidden if needs be, then setting it to Close 1 using a Form Event Action  (that fires based on the logic you're using to set the Status). Then you could set your phone number column validation accordingly.

Davis

I tried changing to a Form Event that fires when the close button is clicked but I get the same result the validation does not happen.

DavisA has reacted to this post.
DavisA

I haven't had much experience with using a form event action as part of the pre-save process so here's how I would approach it if it were my project.

I would have the Form Event Action trigger on a column value change (e.g. whatever condition(s) may be determining the status to be Close 1 vs Close 2, or maybe the Type field changing to Desk Phone). Then have the resulting action set the desired field (in this case Status).

Finally, I would set up the column validation from the Advanced pane on the left to apply to the column that has the required phone number, with a Value validation type and an Operator of is not empty with the conditions you mentioned earlier, Status being Close1 and Type being Desk phone.

Then I would just use the regular save button.

Hopefully this helps and I didn't make it too convoluted!

unfortunately the only thing that sets Close 1 is the click of that button nothing else.  Thanks...I am going to have to think on this and see if there is another way to get that to work.

In those instances, you should be able to set the Form Event Action to fire on form load.

Good luck!