Reflects the current release of Nintex for SharePoint 2016. For your version, please access assistance through the Help button in the product.
This topic describes the selections available in the Rules pane accessed from the Forms designer.
The Rules pane can be displayed on the right of the Nintex Forms designer. Use this pane to change how form controls behave based on defined conditions.
The Rules pane contains the following selections:
Selection | Description |
---|---|
Add Rule |
Creates a new rule for the selected form control. |
View All Rules |
Displays all rules for all form controls. |
View Control Rules |
Display the rules associated with the selected controls. |
Each rule is displayed as a drop-down in the list:
Selection | Description | |
---|---|---|
|
Disable this rule. | |
|
|
Expand or collapse the rule definition. |
|
|
Open the rule menu. |
|
Edit rule | Open the rule to edit it. |
|
Duplicate rule | Create a copy of this rule with the same properties and control associations. |
|
Select associated controls |
Select all controls currently associated with this rule. |
|
Add to selected controls | Add the current rule to all selected controls. |
|
Remove from selected controls | Remove the current rule from all selected controls. |
|
Send to top | Move rule to the top of the list of rules. |
|
Send to bottom | Move rule to the bottom of the list of rules. |
|
Delete rule | Delete rule from the form. |
Rule properties
Selection | Description |
---|---|
Name | The name of the rule. |
When |
The condition to trigger the rule. The formula must evaluate to TRUE for the rule to be triggered; any other value will be treated as FALSE, and the rule will not be triggered. Click |
Then |
Select whether the rule should:
|
Validation Message |
The message to display when the rule invalidates associated controls. This field is only displayed when Invalidate is selected in the Then property. |
Value |
The value to set the control to. This field is only displayed when Set value is selected in the Then property. |
Building a rule formula
You can use:
Symbol | Meaning |
---|---|
== | is equal to |
=== | is exactly equal to (value and type) |
!= | is not equal |
!== | is not equal (neither value or type) |
> | is greater than |
< | is less than |
>= | is greater than or equal to |
<= | is less than or equal to |
&& | and |
| | | or |
! | not |
Note: When building a condition or other formula for a control within a repeating section (an instance of the control Repeating Section control), keep in mind the possibility of multiple rows. For example, use an average or other aggregate formula instead of an equivalent, or include the function currentRowNumber in the formula. Conditions and other formulas that reference a control in a repeating section without following these best practices may not work. If the referenced control has multiple rows, then a badly formed condition or formula (one that assumes a single row) cannot be completed.
The Rules pane contains the following selections.
Drop-down list for each existing rule:
Selection | Description |
---|---|
Select associated controls |
Selection of controls (and the Controls in Use pane) will be reset to all those controls on the current device layout associated with the current rule. |
Add to selected controls | Add the current rule to all of the selected controls. |
Remove from selected controls | Remove the current rule from all selected controls. |
Send to top | Rule will be moved to the top of the list of rules. |
Send to bottom | Rule will be moved to the bottom of the list of rules. |
Delete rule | Rule will be deleted from the form. |
Formatting: The condition that will trigger the rule is set in the Condition field. The formula here must resolve to the value of TRUE for the instruction on the rule to be triggered, any other value will be treated as a FALSE value and the rule will not be triggered. The formula builder button (to the right of the Condition field) can be used to aid construction of condition formulas. Syntax for conditions can include any variables available in the formula builder; including Item Properties and Named Controls. Runtime functions and standard mathematical symbols can be used to manipulate or compare values for the purpose of crafting a condition. In addition, the following symbols can be used as comparison operators. String literals must be contained in double quotes (e.g. Option=="High").
Symbol | Meaning |
---|---|
== | is equal to |
=== | is exactly equal to (value and type) |
!= | is not equal |
!== | is not equal (neither value or type) |
> | is greater than |
< | is less than |
>= | is greater than or equal to |
<= | is less than or equal to |
&& | and |
| | | or |
! | not |
Use the {Self} variable (available in the Named Controls tab in the Formula Builder) to reference the value in control associated to a rule within a condition. For instance, set a rule's condition to "{Self} > 5" if you want formatting to be applied to the control when it contains a value greater than 5.
Condition: The condition that must exist for the rule to be executed. Click (to the right of the field) to open the Formula Builder dialog box. For more information about Formula Builder, see Formula Builder.
Note: When building a condition or other formula for a control within a repeating section (an instance of the control Repeating Section control), keep in mind the possibility of multiple rows. For example, use an average or other aggregate formula instead of an equivalent, or include the function currentRowNumber in the formula. Conditions and other formulas that reference a control in a repeating section without following these best practices may not work. If the referenced control has multiple rows, then a badly formed condition or formula (one that assumes a single row) cannot be completed.
Message (validation rule type only): The message to be displayed when the validation rule is triggered. Conditional validation rule example: A form has two input controls, a single line of text which is called "Amount" and a multi-line text control called "Clarification". To the "Clarification" control a validation rule is added with the condition "Amount>1000&&isNullOrEmpty(Clarification)". If a user enters an amount greater than 1000 in the form, they cannot submit the form unless they have explained the expense in the "Clarification" control.
Note: Design or Full Control permissions are required to apply HTML formatting in validation rule messages. Insufficient permissions result in encoded HTML formatting. For example, the validation rule message "<b>Select quantity</b>" is formatted to appear as "Select quantity" in forms published with sufficient permissions; however, in forms published with insufficient permissions, the message appears with the encoded HTML tags ("%/ltSelect quantity%/gt").