Applies to version: 2020.1.x; author: Konrad Wojtycza
The article is an update of the already existing article, it shows the configuration in version 2020.1.3. For the original see: BPS actions - introduction.
The form is the basic element of the workflow process. Thanks to it, users have insight to information included in attributes or attachments, they work on them entering new information/ modifying previous ones. For users to communicate with the system, they need to get a suitable interface.
This article shows the concept of “Field matrix” – a mechanism responsible for presentation of data from the system. In the second part, information about detailed Form field configuration was attached and configuration of over saving of matrix configuration was discussed.
Content of WorkFlow form may differ depending on many elements, differences may occur at:
1) Step in which the document is
2) Role of the person browsing the document (author, person with the task, read-only, superior or HR department)
3) Values (for example visibility of attributes independence from the values in other fields)
4) Reguiredness:
The simple “Matrix” process has been created. Below there is the “Field matrix” tab located in Designer Studio.
Fig. 1. The Field matrix tab
The article describes the “Global form template” tab and tabs related to form fields such as “Visibility”, “Editability and requiredness”, and “Style and behavior”.
Fig. 2. Form field configuration
Before configuring Field matrix, you should configure the Global form template tab. This tab allows you to specify where the form field will be located on the form (left panel, right panel etc.). To place an element on the form, just drag it to the appropriate place. By default, newly created form fields are set in the left panel of the form, while the item lists – on the bottom panel. All newly created fields are invisible in the Field matrix. When the form fields are placed in groups, you can drag all of the group content to other panels simultaneously.
Fig. 3. The Global form template
In the “Form type filter” section, it is possible to set the filtering of fields displayed on the panel to those belonging only to the selected form types.
In the “System areas” section, you can add the fields such as Instance ID and Business entity.
In the “Edit mode” section, you can decide on the default display mode of the form after opening it in the browser (Dynamic, Default view, Default edit).
After configuring the form appearance, go to the “Matrix field” tab.
The field matrix is the basic and obligatory element that defines the visibility of the form fields on the instance form. There is no possibility of showing the form field on the form if it is not visible on the matrix.
The matrix consists of five blocks, where you can place form fields according to the global form template. Respectively:
Every form field is definable separately in the subsequent steps of the process (except for steps of the workflow control type). It means that, if for example on the registration step we can show 3 of 5 elements and then on the second step additional two. Important information concerning editability of the form are two cases:
1. Form edition (button on “Edit”/”Cancel edit”)
Fig. 4. The form menu – edit mode is not available
Fig. 5. The form menu – edit mode is available
2. To gain access to edition of the form, you need to have one of the following privileges:
If a user has the above privileges, the form will open by default in the edit mode.
Screen below shows available form field configuration possibilities on the matrix level.
Fig. 6. The field matrix – Start step
The legend of the field matrix is on the bottom bar of the tab.
Fig. 7. The form – Start step
Below there is the description of the matrix setting (from Fig. 6) and their effect on the form:
The item list visibility and editability settings affect the item list column settings. For example, it the item list form field is read-only, then these settings will also apply to all columns of this list (regardless of the column settings).
Additionally, if the data source defined for the form fields listed does not return any data, in the case of the “Data table” form field, no data will be displayed, and the “Data row” form field will not be displayed at all.
There is the possibility of mass setting of matrix fields – just right-click on its area. In the example below, all “Date” fields are set as visible and required.
Mass setting of a single form field (step):
Fig. 8. Mass setting of a single form field
Mass setting of the selected step (column):
Fig. 9. Mass setting of the selected step
The “Visibility” tab on the selected form field allows you to define the visibility of this form field on the SWE/SWC reports, and on the form (Fig. 10).
Visibility restriction on form – you can define the rule that will be determined the form field visibility on the form. If the field is empty – the visibility settings will be set based on the matrix. If the form field is set to be visible on the matrix, and the rule set in this field will return POSITIVE, true or 1 – the form field will be visible.
The “Always show in element history” option – the form field value change history is visible in the element history. If this field is unchecked, and the rule is defined, the history of changes will remain hidden in the element history.
The visibility settings are not dynamic and only activate when loading the form. To see changes on the form depending on the defined rules, the form should be saved first. Dynamic changes to the visibility of the form field can be configured in the “Style and behavior” tab.
In the example below, the “Number” field will be displayed on the form only for the Webcon Germany GmbH business entity (see the “Visibility restriction on form” field).
Fig. 11. The configuration of the “Number” form field
The “Visibility on report independent of visibility on form” option is selected so this form field will be visible on the form (Fig. 12).
Fig. 12. The report with the “Number” form field
If the checkbox is unselected – this form field will be not visible on the report.
Fig. 13. The report without the “Number” form field
Editability and requiredness tab
This tab allows you to define the rules that determine the editability and requiredness of the form field.
Fig. 14. The Editability and requiredness tab
The editability settings are not dynamic and only activate when loading the form. To see changes on the form depending on the defined rules, the form should be saved first. Dynamic changes to the editability of the form field can be configured in the “Style and behavior” tab.
To work dynamically, it is necessary to enable postback on all form fields that are used in the defined rule. To do this, select the “Value change will cause default values to be refreshed” option on the “General” tab (Fig. 16).
Editability and requredness - example
In the example below, the “Text” form field is determined the rule entered in the “Requiredness restriction” field. If the “Yes/No” field is selected, the “Text” field will be required.
Fig. 15. The configuration of the “Text” field
Fig. 16. Enabling the postback option
The “Text” form field is required because the “Yes/No” field is selected.
Fig. 17. The “Text” field on the form
This tab allows you to define the rules that determine the style and behavior of the form field.
In the “Style” section, you can set the CSS styles that determine the appearance of the form field name displayed on the form and the appearance of the form field value.
The “Regex validation” section is visible only for the text form fields. You can define the regular expression that validates values entered in the value field.
In the “Behavior” tab, you can decide if the form field will be a technical or archival field.
In the “Personal data storage”, you can define the field configuration in terms of GDPR requirements.
Fig. 18. The “Style and behavior” tab
In the “Form rule to be executed on the value change” field, there is the option to define the form rules to be executed on value change. They may be used to dynamically change the field visibility on the form. There are several useful JavaScript functions:
According to the rule defined on “Yes/No” form field change value (Fig. 19), the “Text” form field will be disabled for editing if the “Yes/No” field is unchecked on the form (Fig. 20).
Fig. 19. The rule defined on the form
Fig. 20. The “Text” form field on the form
The rule on change value is executed only when changing the “Yes/No” field value. If the checkbox is unselected (and the form is saved), the “Text” field edition will be determined by the matrix settings (Fig. 21). To avoid such a situation, add a twin rule in the “Behavior” tab on the form (Fig. 22).
Fig. 21. The “Text” form field is editable
The “Behavior” tab is used to define the form rules that are executed on form load. These rules can be used for static rules on a form, which should always be performed on loading a form (e.g. hiding, disabling, editing). Additionally, in the example from Fig. 19, the rule performed on loading the form complements the rule on changing the value after saving the instance (Fig. 23).
Fig. 22. The form rule added in the Behavior tab
Fig. 23. After saving the form, the “Text” field is blocked for edition
The ability of managing the visibility, editability and requiredness of form fields in WEBCON BPS has been provided to cover the possible business needs of the form. The matrix of form fields and functionalities available on the described tabs enable the advanced configuration and dynamic forms.
Thanks to the described functionalities, it is possible to adapt individual steps and entire processes to the specific business requirements. Controlling the visibility of fields on reports allows you to define a group of authorized people with access to important/sensitive information. The described functionalities are necessary to ensure the transparency and organization of information presented on the form.