Configuring dynamic behavior in forms
Depending on your business needs, you can mark form fields as required, disable them under certain circumstances, or hide them completely.
For example, in a loan application you can mark the fields that contain the name and address of the applicant as being required fields. This ensures that users do not skip information when completing the form that is crucial to successfully processing the Case.
Configuring form field behavior
To configure form field behavior:
- Open the View with the field that you want to configure.
- In the Configure icon next to the field whose behavior you want to change. pane, click the
- In the dialog box, in the section, define the target behavior of the field:
-
In the Required field, specify whether the field must be completed by the user.
-
In the Disabled field, specify when the field is visible but not available to users.
-
In the Visibility field, define when the form should display the field.
- To configure fields as Read-only at all times or only when specified conditions are met, click inside the Edit mode list and select an option, as shown in the following image:
Conditional form behavior
You can use Constellation to further define form behavior by creating Conditions and When Rules. Conditions and When Rules trigger specific form actions when certain conditions are met within a form.
Conditions
You can configure the visibility of form fields based on conditions that you set, using the Condition builder. For example, in a loan application, you can create a Condition that hides fields that collect information about a spouse if the customer is single.
Learn more about creating Conditions in Constellation.
When Rules
When Rules evaluate a Boolean logic statement that involves comparisons among field values, to return true or false results. For example, you can create a When Rule that returns a true result if a job applicant has more than ten years of experience, and if the applicant speaks French fluently. As a result, an application performs a specific action, such as starting an optional application process in a Case.
Conditional values in forms
Constellation enables you to conditionally populate fields, when one field determines the contents of other fields in a form. For example, when entering a car ID number, you can configure a flow action to watch for changes in a field, and then launch a Data Transform that populates the related fields with relevant default data — in this case, the car model and year.
The following image shows how entering information in the Vehicle ID field conditionally auto-populates the fields following it:
Learn more about configuring conditional suggested values for forms.
Cascading drop-down lists
The cascading drop-down pattern occurs when a selection in one drop-down list affects the available values in subsequent drop-down lists. For example, when a user selects an industry in an Industry drop-down list, the system can automatically populate the available values in the Industry subcategory drop-down list based on the industry that the user selected.
For example, in the image below, selecting Mining Division as a category automatically populates the subcategory drop-down list with subcategories from the mining industry.
Let’s look at a practical example of configuring a cascading drop-down list in the context of the Industry and Industry subcategory scenario.
In this scenario, a Case’s Data Model contains a Data Page that returns a list of industries. In the Case’s Data Model, we define a picklist property to render the industries as a drop-down list, using our Data Page as a source and choosing the display field and identifier, as shown in the following image:
The Data Model also contains a Data Page called LookupSICByIndustry, for fetching a list of subcategories based on the industry that is passed as a parameter. In the Case’s Data Model, we then define a picklist property to render the subcategories as a drop-down list. We bind the picklist property to the Data Page LookupSICByIndustry, as shown in the figure below. App Studio recognizes that LookupSICByIndustry takes a parameter, so in this way we can pass the industry property that we defined above.
The entire end-to-end process is configured using App Studio, in the Case’s Data Model. This reduces development time and errors, improving consistency across the application stack.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?