Rules

Rules allow the designer of the form to create simple if-then structure to manipulate fields and pages in a form depending on a specified conditions being met.

Rules Examples

To best illustrate the use of rules, we have an example Interact form covering an onboarding process. We have defined some simple rules to show how they can be used in Interact. The form looks as follows:

The first example rule is controlling the fields or pages that a user can see. So even if you give a user access to a form through the standard Hub user management, you can hide specific fields for a user that they will not be able to access.

In our example below, though the user Marion Smith has access to the form, she cannot access the Payroll Details field. This ensures that Marion cannot add payroll details for new starters, whereas other users of the form can.

Our second example is probably the most common use of rules. In the form we have a field that allows the user to select whether the new starter being onboarded is based in the United Kingdom or the United States. If they select United Kingdom, then we want the user to enter the National Insurance Number, if the user selects United States then a Social Security Number should be visible.

This requires two rules as you cannot hide the fields initially, so you have to ‘hide’ the fields depending on the option chosen. Here are our two rules.

The first rule states that if the Office location is set to United Kingdom then hide the Social Security Number, the second rule is the reverse, hiding National Insurance Number when United States is selected.

This then ensures that the user only sees a single field for entering the appropriate number for the geographical location.

Both fields in the form are set to an optional state. If they were set to mandatory then the user would need to complete the field, even when they couldn’t see it.

Our final example rule is to unhide a page in the form. We have in our form a hidden page, this is the Payroll Details page. This page is only visible when the Payroll Details field is set to Yes as illustrated below.

This rule works in conjunction with the first rule we described. As Marion doesn’t have access to the Payroll Details field, she cannot ever get to the second page.

Rules Logic

The rules logic varies depending on the element that is being used within the form. The table below shows the rule logic that can be applied for the specific element type .

Field type IF options Then Options States

Text

Contains, Does not contain, Equals, Does not equal

State is

Set value to

Optional
Mandatory
Read only
Hidden

Number

Equals, Does not equal, Is less than, Is less than or equal to, Is more than, Is more than or equal to

State is

Set value to

Optional
Mandatory
Read only
Hidden

Date

Equals, Does not equal, Is after, Is before, Is in month, Is not in month, Is in year, Is not in year

State is

Set value to

Optional
Mandatory
Read only
Hidden

Time

Equals, Does not equal, Is after, Is before

State is

Set value to

Optional
Mandatory
Read only
Hidden

Upload

File size is greater than, Files size is less than, File type is, File type is not

State is

 

Dropdown

Single choices: Equals, Does not equal

Multiple choices: Contains, Does not contain, Selection quantity is, Selection quantity is not, Selection quantity is less than, Selection quantity is less than or equal to, Selection quantity is more than, Selection quantity is more than or equal to

State is

Set value(s) to

Optional
Mandatory
Read only
Hidden

Radio Group

Equals, Does not equal

State is

Optional
Mandatory
Read only
Hidden

Checkbox Group

Single choices: Equals, Does not equal

Multiple choices: Contains, Does not contain, Selection quantity is, Selection quantity is not, Selection quantity is less than, Selection quantity is less than or equal to, Selection quantity is more than, Selection quantity is more than or equal to

State is

Set value(s) to

Optional
Mandatory
Read only
Hidden

Table

Number of rows added equals, Number of rows added is more than, Number of rows added is less than

Not selectable

 

The following apply for the default items:

Field Description

Pages

Can only be added into a Then and allows State changes of Hidden and Visible.

Submitter

Can only be added into an If and allows is and then a defined submitter to be provided.

Submission

Can only be added into a Then and either send for approval or not. The two options are Needs approval or Doesn’t need approval.

Priority

Can only be added into a Then and the option available is is where a priority can be set than overrides the default set on the form basic information page.

SLA

Can only be added into a Then and the option available is is where a SLA can be set than overrides the default set on the Form basic information page.