In this post, we will discuss how we can implement validation rules by the condition in Nintex forms for Office 365 SharePoint online. We can implement validation rules very easily by using various functions, field etc which are available in Nintex forms for Office 365. If you are starting with Nintex forms then you can read: Working with Nintex Forms for Office 365 SharePoint Online.
In this example, I have a drop-down list in SharePoint list form which has two option: Approve and Reject. My requirement is if the user selects the Approve button then there should not be a validation. But if user select Reject option, the user has to put some comment for rejection in a multiline textbox.
Implement Validation Rules by Condition in Nintex Forms for Office 365 SharePoint Online
First Open your SharePoint online site and the go to the particular Sharepoint list. From the list ribbon click on Nintex Forms option which will open Nintex form designer.
Then In the Nintex form designer, Drag and drop a Choice control from Forms Controls toolbox. Then double-click on the Choice box to open Settings dialog box. Here give a name for the choice control. Then select the display format, I want this to appear as a drop down list, so I selected Drop down list option. Then put the values, here I want only two options to Approve and Reject. So add Approve, Reject (separate by comma). The settings will look like below:
Then drag and drop a Panel control to the form and double-click on the Panel to open the Control Settings dialog box. Here give a name and Title put some meaningful message which will appear in the panel. It looks like below:
Now drag a multiline textbox inside to the panel. Double click on the Multiline textbox to open settings dialog box. Give a name form the multiline textbox and then Save.
Now it is time to add our rules to the control.
Select the Panel control and then from ribbon click on Add Rule button. Once it will open give a name for the rule and then select Rule Type as Formatting. Then in the Condition box, click on the fx button. Here we will write a rule to show the comment box when the user selects the Reject button.
Here select from Named Controls select the drop-down list name, then from the Operators select the “!=” operator. Then write “Reject”. So the rule should be: choiceApproveReject !=”Reject”. Then in the Formatting option, choose the Hide option. The rule should look like below:
So the rule is like:
txtRejectComments ==”” && choiceApproveReject==”Reject”
And type validation message as “Please enter rejected comment.”
So the rule should look like below:
Now publish the form and then try to create a list item as shown in the fig below: If you select Reject option and then try to submit it will display the error message as shown in the fig below:
You may like following Nintex forms for Office 365 tutorials:
- Steps to create column in Nintex forms designer in Office 365 SharePoint Online
- How to use Repeating Section in Nintex forms for Office 365 SharePoint online?
- How to change Nintex Forms header banner in SharePoint Online Office 365?
- How to apply rules in Nintex forms for Office 365 SharePoint online?
- How to reset to out of box list forms from Nintex Forms customization in SharePoint Online
- How to implement mandatory field validation in Nintex forms in Nintex forms for Office 365 SharePoint Online?
- Steps to show cascading dropdown in Nintex Forms for Office 365 SharePoint Online
- Add different layouts into Nintex forms in Office 365 SharePoint Online
- How to design multiple step forms using Nintex forms for Office 365 SharePoint Online?
- How to set a default value for lookup column in Nintex forms for Office 365 SharePoint online?
In this tutorial, I have shown you how to implement validation rules by a condition in Nintex forms for Office 365 SharePoint Online. I have explained how we can display a description textbox, once user select Reject from a dropdown list in SharePoint list form.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials: