Default property values
When a user creates a Case, you might want to set default values for properties that are already known to reduce the time that users spend entering data. For example, in an insurance claim Case, you can set the default date of loss to today's date.
In other cases, you might want to use data from the operator record, such as the user's organization unit, to initiate property values. For example, in a travel booking application, you set the First Name and Last Name fields to the first and last name on the user operator record. In addition, you set the Date of Travel field to today's date and the Date of Return field to seven days in the future. The travel booking example is displayed in the following figure:
Setting default values can also be useful in a development environment. When you iteratively run a process to test your changes, you can save time by using a Data Transform to enter default values in required fields.
Data initialization page
You can edit default values in App Studio by using the Data initialization page on a Case Type's Settings tab. When you create a Case, you can select properties to set default values and you can assign exact values to each property. You can also set properties to another property within the same Case Type. Available actions and properties are shown in drop-down menus. In the example below, two data initializations are configured to perform specific actions when a Case is created:
- Subscribe to notifications.
- Set the Description field to New order created.
At runtime, the Case instance displays the default values you specified on the Data initialization page, as shown in the following figure:
Note: The Data initialization page updates the pySetFieldDefaults data transform. You configure more complex data initialization use cases in Dev Studio.
Check your knowledge with the following interaction: