Rules

Rules 

Applying rules and conditions to your form allows it to become interactive, as it can show or hide form items based on certain conditions or responses given by the participant. 

 


Table of Contents

Configuring Rules

Rule Restrictions

Tips Using Rules

Example 1: Hide an Adviser's Section of the Form from a Student

Example 2: Display a Dynamic Number of Form Items Based on Input

Work-Around 1: Reference the Same Action in Different Rules

Problem

Work-Around


 

Configuring Rules

Create your form including all content (form items), formats and layout, then follow the steps below.

 

  1. Select the form item that should be used as the condition for your rule and select Rules, then select Add a New Rule, as seen below. 

 

  1. Configure your condition(s) and select your action(s).
  • Condition(s) details:
    • The IF section is where you identify the condition(s).
      • Item - This will default to the form item that you selected, and it will control the condition. You can change the form item by selecting from the drop-down list. 
      • Treat Value As - This lets you decide how you want to treat the value of the form item. Select Text, Number or Date/Time.
      • Comparison - This allows you to configure how you want to set the condition, depending on how you treat the value there are different options available. 
      • Value - This allows you to configure the value that defines the condition, which is based on the applicant’s response to this form item.
  • Action(s) details: 
    • The THEN section is where you select the action(s).
      • Show or Hide - Identify if you want to Show or Hide a form item based on if the condition(s) is/are met.
      • Form Item - Identify the form item that you want to Show or Hide from the drop down menu.
      • Show/Hide on PDF? - Checking this box determine if the same action should be Shown or Hidden on the PDF version. Checking this box means that the PDF will display what the applicant sees in the browser view.
  1. You can add additional conditions or actions to your rule by clicking on the Add Condition or Add Action buttons. 
  • For additional conditions, you must select the operand of AND or OR.
  • If additional actions are added, all additional actions will be applied based on if the condition(s) are met. 
  1. Click the Save icon at the top right of your rule to save your configured Rule(s).

 

Rule Restrictions

  • Dynamic Forms does not support the use of both AND and OR operators within the same rule. 
  • A specific Action can only be referenced by a single Rule, so each rule must reference a different Action. 
    • An error will be displayed if you attempt to create 2 or more Rules that reference the same Action.
      • Note: See Work-Around 1 to learn more about a way to reference a single Action in different Rules.

 

Tips Using Rules

You can apply rules to form items to hide them only when certain conditions are met. 

 

EXAMPLE 1: Hide an Adviser’s Section of the Form from a Student 

You have created a multi-participant form where a Student initiates the form, then an Adviser gives their approval. Form items for both the Student and Adviser are on a single page, but you don’t want the Student to be able to see the Adviser’s section. 

When an Adviser logs into the form, we can have a Short Answer prefill with the Adviser’s CampusID. Since the CampusID will only be populated after an Adviser has entered the form, we can configure a Rule that states:

  • IF Adviser_CampusID (Treat Value As: Text) Is Answered;
    • THEN SHOW Adviser_Section_Table - Show on PDF. 
    • (THEN SHOW - List all Form Items that should only be displayed when CampusID is populated/specific Participant has accessed the form)

This means the Student won’t be able to see the Adviser’s section, since the Adviser’s CampusID won’t be prefilled yet. Once the Adviser accesses the form, their CampusID will be prefilled and based on the Rule configured, the Adviser’s section will be displayed. Therefore, only the Adviser will see the Adviser section. 

If you don’t want the Adviser’s CampusID displayed on the form, you can configure another Rule that states:

  • IF Adviser_CampusID (Treat Value As: Text) Is Answered, 
  • OR IF Adviser_CampusID (Treat Value As: Text) Is Not Answered;
    • THEN HIDE Adviser_CampusID - Hide on PDF.

Therefore, the Adviser’s CampusID will always be hidden and never displayed on the form or PDF.

 

EXAMPLE 2: Display a Dynamic Number of Form Items Based on Input 

You're asking a participant to identify the number of children under their SFA Health Plan to determine the amount of financial aid they qualify for and need to collect their children’s details. You can ask the participant to enter their number of children and based on that response display an equal number of set questions.

Create rules where the Condition uses the Comparison of Greater Than and the Value that references the number of children, in increments of 1, with the Action that shows 1 additional Table or set of questions for each child based on the participant's input. 

You would configure rules that state:

  • IF No_of_Children (Treat Value As: Number) is Greater Than 0;
    • THEN SHOW Child1_Table - Show on PDF.
  • IF No_of_Children (Treat Value As: Number) is Greater Than 1;
    • THEN SHOW Child2_Table - Show on PDF.
  • IF No_of_Children (Treat Value As: Number) is Greater Than 2;
    • THEN SHOW Child3_Table - Show on PDF.
  • IF No_of_Children (Treat Value As: Number) is Greater Than3;
    • THEN SHOW Child4_Table - Show on PDF.
  • IF No_of_Children (Treat Value As: Number) is Greater Than 4;
    • THEN SHOW Child5_Table - Show on PDF.

This would reference a single set of Tables, 1 for each additional child. Meaning whether the participant has 1 child, 3 children or 5 children, it will always show at least Table 1. 

 

Work-Around 1: Reference the Same Action in Different Rules

Each rule must reference a different Action. Therefore, you cannot have more than one rule that references the same Action. 

 

Problem:

You want to SHOW FormItem1 when conditions ‘A and B’ are met AND when conditions ‘C or D’ are met. The Rules would look like: 

  • IF A AND B are met; 
    IF C OR D are met; 
    • THEN SHOW FormItem1.
  • But you cannot include both an AND operand with an OR operand within the same Rule condition. 

 

If you wanted to split it into 2 separate rules, it would look like this: 

  • IF A AND B are met; 
    • THEN SHOW FormItem1.
  • IF C OR D are met; 
    • THEN SHOW FormItem1.
  • But you also can’t create 2 Rules that reference the same Action. 

What do you do if you can’t find a way to configure the rules knowing you must reference the same Action = Show FormItem1?

 

Work-Around:

To get around this, you can embed the Form Item within a Table and continue embedding within another Table for as many times as you need to reference that Action. Therefore, one Rule can reference the Form Item itself, another Rule can reference the first Table, another rule can reference the second Table and so on. 

Embedding a FormItem1 within a Table (Table1), embedded within another Table (Table2) would look like this:  

 

The Rules would be separate, referencing different Actions, but showing the same Form Item in all 3 Rules: 

  • IF A AND B are met; 
    • THEN SHOW FormItem1.
  • IF C OR D are met; 
    • THEN SHOW Table1.
  • IF E is met; 
    • THEN SHOW Table2.

 

Questions? Contact the Dynamic Forms ITS Team by emailing pmo@sfasu.edu.