Cells visibility and editability using expressions

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Business Rules > Business Rules examples > Cases and activities > Managing user interface > Visible, editable and required using expression >

Cells visibility and editability using expressions

In many cases it is necessary to evaluate conditions in order to define if a specified cell of a table is editable or visible.

Bizagi allows defining expressions to evaluate the necessary conditions and configure the desired behavior for the whole column or for rows independently.

 

Suppose a company has implemented a process in Bizagi to manage the tasks of projects. In the first task, the project manager plans all the necessary tasks, its deadlines and responsibles. Once planned the project, an activity is enabled to each responsible in order to report the progress of the tasks.

 

The project manager is able to see the current status of each task, in the third activity of the Process, as shown in the next image:

 

Wheretousebusinessrules58

 

The possible status are: In progress, completed, canceled and overdue.

 

Configuring specific cells editability

Suppose that if the status of a task is In progress or overdue, the project manager can extend the task deadline, otherwise the deadline cell should remain not editable. We need to define an expression to evaluate each row and set the corresponding behaviors.  To do so, follow the next steps:

 

1. From the third step of the Process Wizard go to the form of the task where the behavior is going to be configured.

 

2. Click on the table that contains the cells of interest and the click the Edit Columns button.

 

Wheretousebusinessrules60

 

3. Click the Deadline cell. Note a new contextual menu will appear at the left hand side.

 

Wheretousebusinessrules61

 

4. In the Cell Editable option click the expression icon.

 

Wheretousebusinessrules62

 

5. In the new window create a standard expression.

 

Wheretousebusinessrules63

 

6. Include the preconditions regarding the value of the status of the task that will enable the cell to be editable.

 

Wheretousebusinessrules64

 

Click OK to save the changes.

 

Go to the Work Portal to test the behavior. Note that if the status of the task is Completed or Canceled the Deadline cells are not editable.

 

 

Wheretousebusinessrules59

 

Hiding the value of a specified cell

Suppose that if the status of a task is Completed or canceled the comments done are not longer relevant and should not be displayed anymore.  We need to define an expression to evaluate each row and set the corresponding behaviors. To do so, follow the next steps:

 

note_pin

We strongly suggest that if you choose to control visibility using Expressions, all visibility definitions are done with expressions.

Beware that combining visibility Actions with visibility Expressions will most likely fail in runtime.

 

1. From the third step of the Process Wizard go to the form of the task where the behavior is going to be configured.

 

2. Click on the table that contains the cells of interest and the click the Edit Columns button.

 

Wheretousebusinessrules60

 

3. Click the Comments cell. Note a new contextual menu will appear at the left hand side.

 

Wheretousebusinessrules65

 

4. In the Cell Visible option click the expression icon.

 

Wheretousebusinessrules66

 

5. In the new window create a standard expression.

 

Wheretousebusinessrules63

 

6. Include the preconditions regarding the value of the status of the task that will enable the cell to be visible.

 

Wheretousebusinessrules64

 

Click OK to save the changes.

 

Go to the Work Portal to test the behavior. Note that if the status of the task is Completed or Canceled the values of the comments cell are not visible.

 

Wheretousebusinessrules67

 

note_pin

Bear in mind that even if a cell is not visible, it will be available when defining expressions, and will be affected by them since the cell is included in the project's metadata.


Last Updated 7/19/2023 4:52:46 PM