Skip to main content

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:

Current Status of Each Task

The possible statuses 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 then click the Edit Columns button.

Edit Columns Button

  1. Click the Deadline cell. Note a new contextual menu will appear on the left-hand side.

Select Deadline Cell

  1. In the Cell Editable option, click the Expression icon.

Cell Editable Expression Icon

  1. In the new window, create a standard expression.

Create Standard Expression

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

Define Preconditions

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.

Work Portal Test


Hiding the value of a specified cell

Suppose that if the status of a task is Completed or Canceled, the comments done are no 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:
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 then click the Edit Columns button.

Edit Columns Button

  1. Click the Comments cell. Note a new contextual menu will appear on the left-hand side.

Select Comments Cell

  1. In the Cell Visible option, click the Expression icon.

Cell Visible Expression Icon

  1. In the new window, create a standard expression.

Create Standard Expression

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

Define Preconditions

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.

Work Portal Test

Note:
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.