<< Click to Display Table of Contents >> Default value |
The Default value property automatically sets a value when the form opens for the first time in the Work Portal. This property is used when a Control typically expects a value and is helpful as it saves the end user some clicks.
A default value is defined through the Forms designer in Bizagi Studio. To set a default value, follow the next steps.
In the Forms Designer:
1.Click the Control of the Form in which you want to define a default value.
Default value property is displayed for the following Controls in the Advanced Properties tab:
•Combo
•Date
•List
•Money
•Number
•Radio
•Text box
•Yes/No
2.Open the Advanced properties of the component.
In this case, we will assign the Control Request date a default value.
The Default value property allows you to enter a value or an expression, according to the Control type. In this property you can select the following options to define the default value:
a.Edit this field: to set a constant as the default value. For more information refer to the Edit field chapter.
b.Create a rule expression: to use an expression to set the default value. For more information refer to the Create a rule expression chapter.
Keep in mind that the type of value returned in the expression must coincide with the type of value that the control manages (e.g dates with dates, integer with integer). If they are different, errors may occur in the execution of the form. |
To set a constant value as the default value follow the next steps
Click the Edit this field button located beneath the Default value label.
Assign a value. In this case, we are selecting a date.
To use and expression to set the default value follow the next steps.
Click the Create a rule expression button located beneath the Default value label.
You can select or create a new expression. For more information, refer to the Expression element article.
Click the New button.
Create a new expression.
In this case, we will assign the current date, this will allow the Control Request date to have the date in which the instance of the process started.
Now Request date will have the date in which the process started.
For more examples on how to assign a Default value using expressions, refer to the Default value using expressions article.
If you are using an expression, its name will be displayed on the left. If the name is too long to fit in the box, hover with the mouse, a tooltip with the complete name will display.
|
When a value or expression is selected it will be shown in the property's description area.
To delete the value, click the Delete icon (). Be careful when deleting, as Bizagi does not ask for confirmation. However, if you delete a default value by mistake, you can always click Undo.
Once you choose a new value, it will replace the default value.
If the control is set using an expression, the default value in the property will be ignored.
Last Updated 11/5/2024 4:41:07 PM