cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Validation on a particular Button click

Hi All,

I have a requirement where I need one Text box field to not be empty when a particular button is clicked. I am trying to achieve this via Validation Rules. I am applying the validation on the button instead of the tex box because it should work only on that button click. However the Validation is not working. Can anyone please help me. Below is screenshot of the validation applied.

Validation for button

Tags (2)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Validation on a particular Button click

I would highly recommend that instead of trying to set this up the way that you are, to instead us a Yes / No Control, which can be validated against (from the TextBox) very easily.

From a user perspective, it would also probably be easier being that accidental button clicks happen sometimes, and without a clear indication of that 'toggle', it's difficult to tell which state the form is in. 

The Yes / No Control takes care of that rather easily. 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Validation on a particular Button click

Hi nmarples,

Thank you for your reply. I have tried a workkaround and disabled the button untill there is data in textbox. However if there is better way to apply validation on button click,it will be really great. Thanks for your support.

Regards,

Akshay

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Validation on a particular Button click

Use a Yes/No control as I mentioned earlier. 

Here is an example Yes/No control called "Toggle" 

Here is a TextBox Control called "SomeTextBox":

On the Form they look like: 

Create a Validation Rule on the Text Box: 

Here is the Rule's Formula: 

Now if you try to Submit the form when that Checkbox is Toggled, and nothing is in the Text Box, it will not be valid: 

If you fill it out though: 

You could even take it a step further by adding a Formatting Rule to your Text Box control that disables it if the check box is not checked! 

Hope this helps. 

0 Kudos
Accept as Solution Reply