Sharepoint SIG

Thoughts and ideas from your SharePoint support team

Nintex Forms and the New “Rules” Feature


In the latest update to the Nintex Forms product, they have introduced a new “Rules” feature.  With this feature, you can check the value of a field and then change the formatting of the field on which  the rule is applied.  For example, you could change the background to red if another field on the form was equal to No.  Alternatively, you can hide or disable a field based on the choice made in a different field.  However, there are some caveats to this feature.

A brief tutorial on the Rules feature

To help you understand how the Rules feature is used, here are basic instructions on setting them up.

  • Open up the form in design mode for the list or library where you want to implement the rule by clicking the List tab and choose the form from the Nintex Forms button.

  • Click on the field that you want to hide/disable/change formatting based on the contents of a different field.
    • Note that it is possible to attach more than one Rule to a field. 
  • In the Control Properties ribbon for the selected field, click on the “Add Rule” button at the right.

  • The Rules pane will open up at the right of the screen
  • Click on the “Add New Rule” button at the top of the Rules pane

  • Enter a name for the rule into the Name field
  • Click on the Formula Builder icon to the right of the Condition field

  • The Formula Builder dialogue box will open.
  • Double-click the name of the field that you want to use in the rule.  It will appear in the Formula box below the list of fields.
  • Enter the rest of the condition.

  • Alteratively, use the items under Common, Item Properties, or Runtime Functions to build up the condition.
  • When done, click the OK button.
  • Set the desired formatting in the Formatting section of the Rules pane.  See the Preview box to check the results.

  • When done, publish your changes and test them out.

Now for the caveats

When formatting the condition, it must be correct Javascript.  For example, the condition in the graphic above is “BoolTest==True”.  If I had typed “BoolTest==” instead, the condition is not complete.  This may cause odd problems in the rest of your form.  The problem that I noticed right away is that date fields will no longer have their picker control.  Other problems may occur as well.

Since the condition is Javascript, you must use “==” instead of “=” when checking whether a item is equal to a value.  If you use “=”, the condition will not work and you will get the following error when in Edit mode:

When in the Formula Builder dialogue box, you may be tempted to simply type field names into the formula box at the bottom.  After all, you can see the list of fields in the Control tab.  But if you do this, the text that you type will not be linked to the actual field and the formula will not work.  Always choose the fields (or formulas, or item properties) from the correct tab in the Formula Builder.  For the current field, choose {self}. You will know that it is correct if the field name is red, not black.

Text formatting may not behave the way that you expect.  If you decide that the text will be dark green 18 point Courier font when the rule’s condition is met, this will only be displayed if the form is open for viewing.  If the form is open in Edit mode, the text formatting will not be visible.  If you need formatting on the field to be visible in Edit mode, change the background colour instead.

Leave a Reply