Hello, how can we help you?

Recent Searches: Workspace - 3.1 - Workflow - 3.1 - Training - 3.1 - Request - 3.1

Configuring rules in the responsive form

Form icon with a blue background, leading to the form registration step, where users register non-responsive forms. Laptop and mobile phone icon with a blue background, leading to the responsive form registration step, where users register a responsive form. Pencil icon with a white background, leading to the form management step, where users review forms. Link icon with a white background, leading to the form-process association step, where users associate the form with a process and fill it out.

 

Prerequisites

  • Access to the File > Form (FO005) menu.
  • Previously created and designed responsive form.

 

Introduction

Rules are mechanisms that make the form display fields, hide them, or make them mandatory in different situations. 

They are used to define the actions that will be executed, according to the information inserted in the form. 

Actions allow for comparing inputted information, editing field properties, displaying a message on the screen, executing another rule, and executing a dataset to fill in form variables with the result of this execution.

Since the example used is a travel request form, we will create a rule to block the input of a return date that precedes the departure date on the travel data screen.

See how to configure and apply rules in the fields of a responsive form:

 

Configuring rules

1. Access the File > Form (FO005) menu.

2. Select the form in which the rule will be created.

3. Click on the arrow next to the Edit icon. button and select Form designer.

4. Configure the desired rule:

 

Available actions 

After creating a rule, we need to add the actions that will be executed in the fields when it is applied.

See the actions available to be added to the rules:

Create conditional expression

Conditional expressions can be used to compare or verify form data. For example, it is possible to check if a form field is null (empty or not filled in).

A conditional expression returns the True or False value for each case (comparison). If the result of a conditional expression is True, a certain action will be executed; otherwise, the action will not be executed. To execute another action when the conditional expression returns the False value, the ELSE option must be added.

The conditional expression is equivalent to the IF and ELSE functions of the formula editor of web forms.

 

A conditional expression may have two structures (IF-THEN-END or IF-THEN-ELSE-END):

IF <condition> THEN

      <action that will be executed if the condition is True>

End IF

First structure

IF <condition> THEN

      <action that will be executed if the condition is True>

ELSE

      <action that will be executed if the condition is False>

End IF

Second structure

While creating a rule, when the Add action button is clicked and the Create conditional expression option is selected, the system will display a screen for conditions to be created:

Configuration screen for the "Conditional expression" action, with the condition settings open and the "Value source", "Value", and "Operator" fields and comparison expression areas highlighted.

A - In the Value source field, select the source of the value that will be used in the conditional expression. Condition values may originate from form fields, variables, expressions, and functions already recorded in the form, or from fixed values. See further details about this field in the table below.

B - After selecting the source value, we must specify what the value will be; the options available for selection depend on the value source that has been selected. The Type and Value fields are shown at this spot when the value source is a Fixed value and they must be necessarily completed. Enter the fixed value type and the respective value that will be used in the conditional expression. See further details about this field in the table below.

C - The Operator field allows for defining the criterion to verify the expression. Depending on the selected Operator, we can check if a certain form field has been completed or not. It is also possible to compare two expressions by means of operators such as: equal, different, null, not null, greater than, less than, greater than or equal to, less than or equal to, contains, and does not contain. When a comparison operator is selected, the fields of the second expression will be enabled immediately. See further details on this field in the Operator table.

D - This area shows the condition in writing. Thus, it is possible to check if the condition has been configured correctly. The condition may return two results: True or False. When the condition is true, the action assigned to it will be executed; otherwise, no actions will be executed, or the action assigned to ELSE will be executed.

E1 - Expression 1 - In this area, the first expression of the condition is defined. If the condition is only used to verify whether a value is null/false or not, a second expression does not need to be configured; however, if the conditional expression is comparing two values, the second expression of the condition must be defined.

E2 - Expression 2 - In this area, the second expression of the condition is defined. This area will be enabled when a comparison operator is selected (equal to, different from, greater than, less than, greater than or equal to, less than or equal to, contains and does not contain).

Value source  
Form field Select this option to use the value of a certain form field in the condition. It is possible to verify if the field has been completed or compare the value of the field with another value, which may be a fixed value or the value of another form field.
Variable Select this option to use a variable from the table in the condition.
Function Select this option to use, in the condition, a previously created function.
Expression Select this option to use, in the condition, a previously created expression.
Fixed value Select this option to use a fixed value for the condition. The system accepts fixed values of these types: text, paragraph, integer, decimal, time, date, or Boolean.
Operator Description Fields
Equal

This operator allows for verifying if the value of the first expression (E1) is equal to the value of the second expression (E2). 
If the values of the two expressions are the same, the condition will return the True value; otherwise, it will return the False value.

Note: in the case of a checkbox (Boolean), the condition will return True if the two fields are checked (true) or if both are unchecked (false), indicating that the values are equal. The condition will return False if the values are different, that is, if a field is checked (true) and the other is unchecked (false).

Text, Paragraph, Option group, Simple list, Fixed value, Date, Time, Decimal, Integer, Checkbox, Boolean.
Different

This operator allows for verifying if the value of the first expression (E1) is different from the value of the second expression (E2). 
If the values of the two expressions are different, the condition will return the True value; otherwise, it will return the False value.

Note: in the case of a checkbox (Boolean), the condition will return True if one of the fields is checked (true) and the other is unchecked (false), indicating that the values are different. The condition will return False if both fields have the same value, that is, if both are checked or unchecked.

Text, Paragraph, Option group, Simple list, Fixed value, Date, Time, Decimal, Integer, Checkbox, Boolean.
Null This operator allows for verifying if the value of the expression (E1) is null. If the value of the expression is null, that is, if the field is not completed, the condition will return the True value; otherwise, it will return the False value. Text, Paragraph, Option group, Simple list, Fixed value, Date, Time, Decimal, Integer, Checkbox, Boolean, Advanced list, Data source list, File, Signature.
Not null This operator allows for verifying if the value of the expression (E1) is not null. If the value of the expression is not null, that is, if the field is completed, the condition will return the True value; otherwise, it will return the False value. Text, Paragraph, Option group, Simple list, Fixed value, Date, Time, Decimal, Integer, Checkbox, Boolean, Advanced list, Data source list, File, Signature.
Contains This operator allows for verifying if the text of the first expression (E1) contains the text of the second expression (E2). 
If the text of the second expression is contained in the text of the first expression, the condition will return the True value; otherwise, it will return the False value.
Text, Paragraph, Option group, Simple list, and Fixed value.
Does not contain This operator allows for verifying if the text of the first expression (E1) does not contain the text of the second expression (E2). 
If the text of the second expression is not contained in the text of the first expression, the condition will return the True value; otherwise, it will return the False value.
Text, Paragraph, Option group, Simple list, and Fixed value.
Greater This operator allows for verifying if the value of the first expression (E1) is greater than the value of the second expression (E2). 
If the value of the first expression is greater than the value of the second expression, the condition will return the True value; otherwise, it will return the False value. 
In date or time verification, the date/time is considered to be later than the other date/time.
Date, Time, Decimal, Integer.
Less This operator allows for verifying if the value of the first expression (E1) is lower than the value of the second expression (E2). 
If the value of the first expression is lower than the value of the second expression, the condition will return the True value; otherwise, it will return the False value. 
In date or time verification, the date/time is considered to be earlier than the other date/time.
Date, Time, Decimal, Integer.
Greater or equal This operator allows for verifying if the value of the first expression (E1) is greater than or equal to the value of the second expression (E2). 
If the value of the first expression is greater than or equal to the value of the second expression, the condition will return the True value; otherwise, it will return the False value. 
In date or time verification, the date/time is considered to be later than or equal to the other date/time.
Date, Time, Decimal, Integer.
Less or equal This operator allows for verifying if the value of the first expression (E1) is lower than or equal to the value of the second expression (E2). 
If the value of the first expression is lower than or equal to the value of the second expression, the condition will return the True value; otherwise, it will return the False value. 
In date or time verification, the date/time is considered to be earlier than or equal to the other date/time.
Date, Time, Decimal, Integer.
True This operator allows for verifying if the value of the expression (E1) is true. In the case of a checkbox (or fixed Boolean value), this operator verifies if the field is checked or not. 
If the field is checked (true), the condition will return True, but if the field is unchecked (false), the condition will return False.
Checkbox, Boolean
False This operator allows for verifying if the value of the expression (E1) is false. In the case of a checkbox (Boolean), this operator verifies if the field is checked or not. 
If the field is unchecked (false), the condition will return True, but if the field is checked (true), the condition will return False.
Checkbox, Boolean
 
 

Set property

This option allows for changing the property of a form element (making it visible, collapsing it, enabling it, or making it required).

Configuration screen for the "Set property" action.
  • Element: select the field that will have its properties changed. 
  • Property: select the property.
  • Value: set the value to be applied to the property.

In accordance with the set configurations, it will be possible to select an operation.

See further details on the configurations available for each property:

Property Description Fields
Visible This property allows for making the field visible or hidden.
In the Value field, select the Yes option to make the field visible or select No to hide it.
Date, Decimal, Time, Integer, Paragraph, Text, Option group, Simple list, File, Signature, Advanced list, Data source list, Checkbox, Cause analysis, Attachment, Button, Action plan, Table, Card, Image, Panel, Section, and Title.
Enabled This property allows for enabling or disabling the completion of the field. 
In the Value field, select the Yes option to enable the field or select No to disable it.
Date, Decimal, Time, Integer, Paragraph, Text, Option group, Simple list, File, Signature, Advanced list, Data source list, Checkbox, Cause analysis, Attachment, Button, Action plan, and Table.
Required This property allows for making the completion of the field mandatory or removing the completion requirement
In the Value field, select the Yes option to make the field mandatory or select No to remove this requirement.
Date, Decimal, Time, Integer, Paragraph, Text, Option group, Simple list, File, Signature, Advanced list, and Data source list.
Value

This property allows for changing field values to preset values. The configuration of the Value field depends on the field type, as described below:

  • Checkbox: select the True option to check the box or select False to uncheck the box.
  • Date: select the new date for the form field.
  • Time: enter the new time for the form field.
  • Decimal: set the new decimal value that will be inserted in the field.
  • Integer: set the integer that will be inserted in the field.
  • Option group: select the option that will be checked in the field. The options for the selected field will be listed.
  • Simple list: select the option that will be selected in the field. The options for the selected field will be listed.
  • Text: enter the new text that will be shown in the field.
  • Paragraph: enter the new text that will be shown in the field.
Date, Decimal, Time, Integer, Paragraph, Text, Option group, Simple list, and Checkbox.
Dynamic value This property allows for changing field values to values originated from a variable. The value of a variable, in its turn, may come from an expression, a data source, or be a fixed value. 
In the Value field, select the variable containing the value that will be applied to the field. All form variables will be listed; therefore, make sure to select a variable whose value is valid for the type of the field that will be edited.
Date, Decimal, Time, Integer, Paragraph, and Text.
Collapsed This property allows for automatically collapsing or expanding form sections, panels, and integration containers, according to the configured business rules. With it, the form can dynamically adapt, displaying only the most relevant information for the user's current context.
In the Value field, select Yes to maintain the section, panel, or container collapsed, or No to leave it expanded.
Panel, Section, Attachment, Action plan, Cause analysis, Attribute, Responsibility route, Checklist, and Association
 
 

Define variable

Use this action to edit the source of the value of a variable created in the form.

Configuration screen for the "Set variable" action.
  • Variable: select which of the variables will have its value changed.
  • Value source: select the type of the desired option, and then the option with the value to be applied to the variable.
 
 

Clear field

Allows for clearing the value of a certain form field. To do so, select the desired form field.

Configuration screen for the "Clear field" action.
 
 

Display message

Use this action to display a message on the form screen.

Configuration screen for the "Display message" action.
  • Message: describe the message that will be displayed.
  • Type: define whether the message type will be information, success, warning, or critical.
 
 

Execute another rule

Use this action to execute another form rule.

Configuration screen for the "Execute another rule" action.
  • Rule: select the rule that will be executed.
 
 

Open external page

Use this action to execute the URL on a new window or in the background.

Configuration screen for the "Open external page" action.
 
 

Perform operation in the table

Use this action to execute, in the specified table, an operation of the "Sum", "Maximum", "Minimum", "Counter", or "Concatenate" type.

When the Concatenate operation is selected, only variables of the Text or Paragraph type can be selected.

 
Configuration screen for the "Perform table operation" action.
 
 

Translate file

Use this action to translate a PDF file added to a form field.

Configuration screen for the "Translate file" action.
  • Table field: specify the field in which the PDF file to be translated will be inserted. 
  • Language: choose into which language the file will be translated.
  • Target field: specify in which field the translated file will be saved.
 
 

Reload field

Use this action to update table elements and integration containers through rules, without needing to refresh the screen entirely. 

Configuration screen for the "Reload field" action.
  • Form field: specify the form field that will be reloaded.
 
 

Execute dataset

Use this action to assign the result of a dataset to a form table variable.

For example, in a dataset that returns a user's code and name, the code can be assigned to a variable, whereas the name is assigned to another variable.

Configuration screen for the "Execute dataset" action.

For more information on using datasets, refer to the Fetching external data via dataset article.

 
 
 

Execute table data source

Use this action to automatically execute a dataset when loading a responsive form; the grid will be filled out with the necessary information, without manual interaction on the user's part.

Specify which form field, of the Table type, will have its data source executed automatically.

For more information on using datasets, refer to the Fetching external data via dataset article.

 
 
 

Execute REST web service

Use this action to execute a REST web service in a form button or any object that has events for rule execution. 

Thus, it is possible, for example, to fetch data from third-party systems through REST web services and fill in the form fields with the returned data. 

The system also allows for sending data when invoking the service, but with a restriction when sending electronic files and multiple values to the same parameter.

Configuration screen for the "Execute REST web service" action.
 
 

Read barcode

This action allows for using a smartphone camera to fill in a form field by reading a barcode.

Configuration screen for the "Read barcode" action.

Due to security restrictions on mobile devices, this feature can be used only on the SoftExpert Suite native application.

 
 
 

Add comment

Use this action to insert a comment in the instance history using a value entered in the form itself.

Configuration screen for the "Add comment" action.
  • Value source: indicate whether the comment content will be taken from a form field, a fixed value, a variable, an expression, or a rule.
 
 

Change status

Use this action to edit the process instance status.

Configuration screen for the "Change status" action.
  • Status: select the desired status and click on the Save and close button.
 
 

Change priority

Use this action to edit the instance priority. To do that, select a new evaluation method and a result for the method.

Configuration screen for the "Change priority" action.
 
 

Execute task

Use this action to execute tasks using a button of the form that is related to the activity that loaded the form. These actions require the rule to be executed in the interface.

Configuration screen for the "Execute activity" action.
 
 

Stop the activity execution 

This action allows for interrupting the execution of an activity after clicking on the corresponding action button, which provides greater flexibility to perform necessary validations and adjustments before continuing.

Configuration screen for the "Stop activity execution" action.
 
 

 

Conclusion

All done! Now you know how to create rules in a responsive form.


Was this article helpful?