Form Rules

Using the FOR EACH ROW form rule in practice

The article describes how to use the FOR EACH ROW form rule in practice on the WEBCON BPS 2021 platform. E.g how mark all rows of item list.

What is FOR EACH form rule?

From the version 2021 of WEBCON BPS it is possible to use the form rule named FOR EACH ROW. Previously, to manipulate the values ​​of an item list, for each row of an item list, it was necessary to use loops using JavaScript. Now, simple business logic can be performed using the rules of the form using low code blocks.

Use case: Select / deselect all rows of item list

Selecting / deselecting all rows

To achieve the above effect:

  1. Add a checkbox on the change of which you need to add a form rule as shown in the screenshot below
  2. That’s it 🙂 Isn’t it fabulously simple?
FOR EACH ROW form rule usage

Use case: Moving only selected lines of the item list

Now a slightly more difficult example, visible in the animation below.

Copying selected lines of the item list


To achieve the above effect:

  1. Add technical form fields equal to the number of columns in the item list to which you will be moving the rows
  2. Add a technical checkbox
  3. Add a button (HTML form field)
  4. Add a form rule in the technical checkbox added in point 2)
  5. The FOR EACH ROW rule does not allow the use of the ADD NEW ROW rule relating to other item list than current nesting. Therefore, a named business rule should be used to avoid this problem.
  6. Set the default values ​​of the columns as in the attached screenshot
  7. Configure the HTML form field as shown in the attached screenshot
  8. Don’t forget to show the form fields on the attribute matrix
Necessary form fields
Technical checkbox form rule
Technical checkbox form rule (detailed)
Default value of each column
Create HTML button which will be selecting / deselecting technical checkbox
Field matrix view

How it works? When button will be clicked, technical checkbox value will be changed. Then form rule executed on value change of this checkbox will be trigerred. Firstly item list number 2 will be cleared, then for each row of item list number 1: row by row value in column “Check” is verified. Id checkbox is checked the technical form fields are filled with data of current row. Then new row of item list numer 2 is created and values are automatically filled by default values which gets values from technical fields.

Both features combined
nedza.kamil

A graduate of the AGH University of Science and Technology in Krakow. When not involved in the creation and optimization of business processes, he plays board or computer games. He also is interested in using game mechanics (gamification) in real life and business. Spends the evenings creating and prototyping amateur games based on the UNITY engine.

Share
Published by
nedza.kamil
Tags: Form Rules

Recent Posts

Managing local WEBCON BPS groups

WEBCON BPS local groups management using simple process. Adding and removal of multiple group users…

3 years ago

Create your own WEBCON BPS Express laboratory from scratch.

A video tutorial on how to set up a WEBON BPS home laboratory from scratch…

3 years ago

JSON nested collection handling in WEBCON BPS

How to use the OPENJSON tabular function to handle a data import to WEBCON BPS…

3 years ago

REST Web Service Connections – WEBCON BPS Authentication

How to configure and use REST Web Service connections using WEBCON BPS Authentication. Examples of…

3 years ago

Upgrade WEBCON BPS Express from 2020 to 2021

How to upgrade standalone version of WEBCON BPS 2020 to 2021. The article describes the…

3 years ago

Global business rules – ready-to-use examples

Several ready-to-use examples of global business rules that you can create once and use in…

3 years ago