Basic Actions

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Customizing controls behavior > Actions and Validations > Actions components >

Basic Actions

In the next examples we will illustrate how to define basic actions.

 

Hide or show one control based on one condition

Make several controls mandatory and visible based on one condition (including controls one by one)

Make several controls mandatory and visible based on one condition (using Panel - recommended)

Change the format of a control based on compound conditions (using AND)

 

Hide or show one control based on one condition

In a Vacations request process we will like to display the control Leaving date, when Request Vacations is true.

We will hide the control Leaving Date when Request Vacations is false or not selected.

 

Action0

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

Action15

 

2. Include the condition. Click Add a condition and select the control, operator and argument as follows.

When Request vacations changes to true.

 

Action2

 

3. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Change visibility for Leaving date to true.

 

Action3

 

 

4. Define the Else Action, that will execute when the condition is NOT met.

Change visibility for Leaving date to false.

 

Action4

 

This is how the Work Portal will look like according to the end user's choice:

 

Action5

 

 

Make several controls mandatory and visible based on one condition - Including controls one by one

In a Vacations request process we will like to make the following controls mandatory and visible when Request Vacations is true:

Leaving date, Returning date and Number of business days requested.

We will hide those controls when Request Vacations is false or not selected.

 

Action6

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

Action15

 

2. Include the condition. Click Add a condition and select the control, operator and argument as follows.

When Request vacations changes to true.

 

Action2

 

3. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Add as many actions as you need:

Change visibility for Leaving date, Returning date and Number of business days requested to true.

Set required for Leaving date, Returning date and Number of business days requested to true.

 

Action7

 

4. Define the Else Action, that will execute when the condition is NOT met.

Change visibility for Leaving date,  Returning date and Number of business days requested to false.

Note you don't need to make the controls not required, since they will be hidden.

 

Action8

 

This is how the Work Portal will look like according to the end user's choice:

 

Action9

 

 

 

Make several controls mandatory and visible based on one condition - Using Panel (recommended)

In a Vacations request process we will like to make the following controls mandatory and visible when Request Vacations is true:

Leaving date, Returning date and Number of business days requested.

 

You can include controls one by one like in the example above, or you can group them and make a single Action. This is recommended: it will save you a lot of time and make the managing of Actions a lot easier.

 

1. Include a Panel, dragging and dropping from the Controls area.

Drag and drop the attributes you will affect with your Action into the Panel.

 

Action12

 

2 Create the Action just using the Panel as control. Panel groups the controls contained.

 

Action13

 

This example and the one above have the exact same effect on the Work Portal.

There is no difference on the interface presentation, Panels just make you work easier.

 

Change the format of a control based on compound conditions

In a Vacations request process we will like to change the color of the control Leaving date to red, when Request vacations is true AND the Leaving date is greater than the Returning date (which makes no sense).

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

Action15

 

2. Include both conditions in the When section.

 

ActionsandValidations1

 

3. Add the Action in the Then section to change the color of the control.

 

ActionsandValidations2

 

4. Add an Else Action to return the control to the original state.

 

ActionsandValidations3

 

This is how the Work Portal will look like:

 

ActionsandValidations4