All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

Default Value

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords">

value, default, default value

</keywords>

Contents

Default Value

Default Value option allows the user to define a default value for the attribute in the form.

The default value is displayed whenever the attribute does not have a value, that is, if it has a null value, the default value of the render will be shown.

When the value is displayed on the screen, it is not stored and therefore, it is necessary should click on Save or Next in order to save the value for the attribute.


In Grids, a default value can be configured for the edit and the add form. It works just like in any other form, and is saved when clicking SAVE on the user interface.

However, when a default value is defined in a display form, it will be shown only when the attribute has NO value. That is, when the attribute is null. If the attribute where the defaul value is, has had a value entered in the edit or add form, it will NOT BE REPLACED.


Example of a Default Value in a Combos Field.

For the next example, a Purchase Request process will be used. In this case, in the first activity a Cost Center is to be selected, in order to know the department that will pay for the Purchase. The Cost Center is a combo, or drop down list.

A combo can have a default value if desired.


1. When the default value is not enabled in the web aplication a value must be selected. As shown below.

 


2. The Center Cost field is empty, hence the user sould select any value, in this case, Training.



3. The user has two options to select a default value


  • Always show the same value; That is, display the same value of the combo everytime a case is created.
  • Display a value depending on business conditions. This can be done,for example, when the value of another field is required. In this case a rule is needed.

 

Always Show the Same Value.


This option is used when the user needs to always display in a combo field, the same value when a case is created.
Click on the the Combo field, to change the default value.


1. To set a Default Value, select the atribute and click on Default Value, under the Render options. Select the required value. In this case, Production will de used.

 


2. Save the form with the new default value.


3. Check the form on the web application, as soon as a user opens the form the combo field brings the value set before.



Display a value depending on business conditions

Assume that the company has the Advertising deparment in Barcelona therefore the cost center is Advertising. The other deparments of the company are centralized in Madrid.

In the cases created by the users that are working in Barcelona should always display "Advertising".

However, the rest of the users that are not located in Barcelona, should dispay the "Projects" Cost Center, becasue is the Cost Center that requires the most Purchases.


1. To set a Default Value using a rule in a combo field, select the attribute and click on Default Value Expression, under the Render options. This will open a new window to create the Expression.




2. Create the Expression to set the value on the combo field. In this case, the expression is to set the cost center using the city of the creator of the case.


A. First select a name, display name and description for the rule (properties).


B. Set the condition as show below. The city of the creator must be equal to Bacelona in our example.



C. Set the Assigment for both conditions. Advertising will appear when the case´s creator works in Bacelona, otherwise Proyect will appear on the web application on the field cost center.

 


3. Save the form with the new Expression.


4. Check on the web application.


In the next image, notice that in the cost center show is Advertising, because the city of the creator's user is Barcelona.


 In the next image, the cost center shown is Projects, because the city is different from Barcelona.



<comments />