Item list column values generated dynamically

Facebooktwitterpinterestlinkedinmail

applies to version: 8.x.x; author: Kamil Nędza

Based on Hyperlink and SQL Row form fields

Item lists allow to display values generated dynamically, i.e. displayed value may be modified without any additional actions. Their values is generated automatically after the page is loaded. As a result, it is possible to display statuses of other workflow elements, calculated values based on entries in given line and much more. Basically, it is possible to display everything that can be displayed with SQL query.

WEBCON BPS Studio allows to dynamically display values using columns types:

Hyperlink – used to display link on item list. SQL query enables to create dynamic link with changeable displayed name. For instance workflow element link with displayed step name in which element actually is.

SQL Row – displays value from first column of first row based on query results. Additionaly SQL row has various configuration modes of displaying results. It allows to show results as a percentage, as progress bar, as indicator or as a bold field.

Description of sample functionality:

Two workflows exist (Task and Project). Task workflow is simple, three step process which consists of following steps: registration, realization and archive. Task is assigned to a user and (s)he can accept it or reject it. The second workflow (Project) is used to manage tasks.

In this article, we’ll showcase functionality used for monitoring user’s tasks. It can be done on item list in different process using dynamic columns of hyperlink or SQL row type.

Configuration of columns on item list:

Let’s create item list consisting of 4 columns:

–          Tasks (picker) – consists of ID and document number from task workflow

–          Person in charge (SQL row column) – displays person chosen for the task

–          Link – (hyperlink) – after clicking such link, user will be taken to workflow element of given task.

–          Status – (SQL row) – indicator field which shows state of a given task.

 

To add new item list, click form field section on process tree and choose new form field button. Then changing type of new form field to items list is necessary. Add new columns by clicking “New column” button. After choosing field type of a new column, its configuration is available.

At the beginning, create “Task” column. In this case as picker ID let’s choose workflow element ID, which is unique and will allow easily extract certain information:

1

2
Picker configuration

Then create SQL row column. For SQL row it is possible to configure display mode. 4 display modes are available:

3
SQL row configuration

For now, leave it be.

Add two new columns. “Person in charge” will be a text column, in which person assingned to certain task will be displayed. In “Status” column an icon showing state of given task will be displayed.

In case of “person or group” field type, it is good to know that in database information on users is written as: domain_login#displayed_name (e.g.: WEBCON\k.nedza#Kamil Nędza). For clear data presentation it necessary to use built-in function SQL CLEARWFELEM(), which will return only displayed name for user. SQL query looks as follows:

4
Query for “Person in charge” column

As you can see on the screen above it is possible to easily choose given values from expression editor on the right side. Using such fields,will allow to configure “Status” column. Sample query may look as follows:

5
Query for “Status” column

Indicator field allows to show numerical value with indicator icon. For values lower or equal to 0, there will be red indicator assigned; for values equal to 1 it will be yellow, for values greater than 1 it will be green indicator.

In the end, “Step” hyperlink column needs to be added. Using query shown on screen below will allow to create a link with certain displayed name. In our case it will be name of the step in which workflow element is.

6
“Step” column configuration

After creating and configuring columns it is necessary to correctly configure items list on field matrix.

Verification:

In browser, open Project workflow with configured item list. Effect should be similar to the one on screen below:

7
Item list on the form

Leave a Reply

Your email address will not be published. Required fields are marked *