Árvore de páginas



Speaking of form rules...


Form rules are events that can occur in the created form, in a specific activity and field. These events occur only in normal activities or the initial activity of a process. As actions, you can choose to disable a field, validate a value, set a value, and hide the field on the screen. This procedure generates a form event with the defined settings.

EXAMPLE

When an employee selects the IT department as the requester, a form rule can automatically display an additional field to inform the desired equipment model. If another department is selected, that field remains hidden, avoiding confusion and making the filling process faster.


Order of execution of rules in the new form editor


The execution of rules follows a defined hierarchy to ensure that general behaviors are applied before more specific ones. Following the order below:


General rules (valid for all activities)

Executed first:

1. In all activities

2. General groupers

  • Panel
  • Tabs
  • Table

3. General specific field


Specific rules for the current activity

After completing the general rules, the platform executes the rules related to the activity in which the form is being used, also following the same priority:

1. Specific activity

2. Activity groupers

  • Panel
  • Tabs
  • Table

3. Specific field of the activity

This structure ensures that broader rules that impact the entire form are applied first, followed by rules directed to the context of the current activity, always from the most general to the most specific.


Add Rule


Follow the steps below after configuring the process and the form to which the rule will be added.

Tip!

Click here to learn more about configuring processes.  
Click here to find out how to create and edit a process form.  


01. Click on Form Rules .

02. In the modal presented, click on Add Rule.

03. In When the request reaches the activity, select which activity the rule defined for the field will be executed.

04. In the field, select the field for which the rule will be defined.

05. In the form will select the action of the rule that will be defined, with the following options:

  • Hidden: determines that the field will be hidden when the request is in the activity selected in the rule.  
  • Displayed: determines that the field will be displayed only when the request is in the activity selected in the rule.  
  • Disabled: determines that the field will be displayed as disabled for filling when the request is in the activity selected in the rule.  
  • Enabled: determines that the field will be displayed as enabled for filling when the request is in the activity selected in the rule.  
  • Required: determines that the field will be mandatory for filling when the request is in the activity selected in the rule.

Defined Value: determines that a specific value will be assigned to the field when the request is in the activity selected in the rule. When using this option, other fields are presented to finalize the configuration. In the "with" field, define a value among:
What does this mean?

What does this mean?

Customization

  • Fixed value: in this option, it is necessary to fill in the value that will be applied in the "equal to" field.

EXAMPLE

We see in the image that the rule will be applied when it reaches the activity Complement Data, the Department field will be automatically filled with the fixed value defined as Management.

Current User

  • User code: by selecting this option, the form field will be filled with the user code.
  • Name: by selecting this option, the form field will be filled with the user's name.
  • Full name: by selecting this option, the form field will be filled with the user's full name.
  • Email: by selecting this option, the form field will be filled with the user's email.


Request

  • Opening date: by selecting this option, the form field will be filled with the opening date of the request.
  • Current date: by selecting this option, the form field will be filled with the current date of the day.
  • Activity code: by selecting this option, the form field will be filled with the activity code.
  • Request code: by selecting this option, the form field will be filled with the request code.
  • Requesting user: by selecting this option, the form field will be filled with the requesting user.
  • Requester email: by selecting this option, the form field will be filled with the requesting user's email.
  • Validated Value: determines that a value validation will be executed on the field when the request is in the activity selected in the rule. In this case, it is necessary to satisfy the conditions of type Or and And.

In this case, the satisfying field will be presented to configure the condition of type (And) or (Or).

EXAMPLE

In the vacation payment process, the rule ensures that the Vacation Payment Date is not recorded after the Vacation Start Date (due date), avoiding inconsistencies in the payment schedule to the employee.

Other value validation options by selecting an operator:

  • Greater than: determines that the form field will have the value validated meeting a condition greater than the selected value.
  • Greater than or equal to: determines that the form field will have the value validated meeting a condition greater than or equal to the selected value.
  • Less than: determines that the form field will have the value validated meeting a condition less than the selected value.
  • Less than or equal to: determines that the form field will have the value validated meeting a condition less than or equal to the selected value.
  • Equal to: determines that the form field will have the value validated meeting a condition equal to the selected value.
  • Different from: determines that the form field will have the value validated meeting a condition different from the selected value.

Other value validation options by selecting a value:

  • Form field;
  • Specific value;
  • Request number;
  • Enrollment of the logged-in user;
  • Current date;
  • Empty.
  • Validated Format: determines that a format validation will be executed on the field when the request is in the activity selected in the rule. In this case, it is necessary to satisfy the conditions of type Or and And.
  • Executed Events: determines that an event will be executed on the field when the request is in the activity selected in the rule. 

06. After filling in all the fields with the necessary rules and process events, click Save.

Adding Events

When defining that the rule will execute process events, it is necessary to define the events that will occur in the defined field when the request is in the selected activity.

01. Click on Add Event;

02. Define the value by selecting an operator among:

  • Greater than;
  • Greater than or equal to;
  • Less than;
  • Less than or equal to;
  • Equal to;
  • Different from.

03. Define the selected value for the field among:

  • Form field;
  • Specific value;
  • Request number;
  • Enrollment of the logged-in user;
  • Current date;
  • Empty.

03. Define the action that will occur in the field, with the following options:

  • Hidden
  • Displayed
  • Disabled
  • Enabled
  • Filled
  • Filtered

In other words, the event configuration occurs as follows:

  • Monitored field: Will it go to the event?
  • Event: When changing the value of the field, will it go to the event?
  • Action: Enable the Multiple Choice field


EXAMPLE

The company will hold an internal event and, to organize employee participation, a form has been made available. In this form, there is a field called Will it go to the event?, in the format of a single selection, with the options Yes and No. If the employee selects the Yes option, a second field, of the multiple-choice type, will be automatically displayed for them to provide additional information about their participation.

For example, the displayed field contains options such as: 

  • Needs transportation
  • Will participate in the coffee break
  • Needs accessibility

If the No option is selected, the multiple-choice field will remain hidden, as complementary information is not necessary in this case.

Tip!

It is possible to add multiple events to the form, as needed for the process.
It is possible to delete the added events from the icon next to the added event.


How do the conditions work?


When adding rules of the types Validate Value and Validate Format, it is necessary to define conditions for these validations to be applied, choosing between the options 'And' or 'Or'. Below, we will explain how each of these conditions works.


And Condition

This type of condition works integrally, meaning that when adding a rule with the And condition, all defined conditions must be true for the action to occur.

EXAMPLE

A company automated the vacation approval flow and configured a rule so that HR is notified only when all steps are completed.

The rule being: Notify HR when all the conditions below are met.

The conditions being:

  • The request is with the status Waiting for scheduling in HR
  • The direct leader has approved the request
  • The area manager has approved the request

In this case, the notification to HR will only be sent if all these conditions are true at the same time.


Or Condition

This type of condition works in isolation, meaning that when adding a rule with the Or condition, only one of the defined conditions needs to be true for the action to occur.

EXAMPLE

A company automated the vacation approval flow and configured a rule so that HR is notified as soon as one of the steps is completed.

The rule being: Notify HR as soon as there is any movement in the request.

The conditions being:

  • The leader's approval was successfully completed
  • The area manager's approval was successfully completed
  • The request is with the status Waiting for scheduling in HR

In this case, the notification to HR will be sent as soon as one of the above conditions is met.



Attention!

This documentation is valid starting from the Voyager update (2.0). If you are using an earlier update, it may contain information different from what you see on your platform.

  • Sem rótulos