Cascading Drop Down in Pega
Hi all, In this Post we will see how to create Cascading Drop down using Report Definition in pega.
Below is the list of rule I created to implement this.
- Local Data Table
- Two Report Definition
- Flow
- Flow Action
- Section
- Two Property in Data Class and Two Property in Work Class.
I created a Class Named Teky-PeopleNe-Data-ProductInfo . In this class I created two property named ProductName and ProductPrice .
I created ProductName as Key for this table and added some sample data.
Now our concept is on choosing the ProductName the corresponding ProductPrice we have to display in next drop down. So I created two Report Definition in Teky-PeopleNe-Data-ProductInfo class.
In the below report definition we get all ProductName which is not null.
In the below Report Definition we get the ProductPrice which corresponding to the ProductName
I created a flow in Work Class.
I created a section with two fields one for ProductName and another one for ProductPrice. Source for this property is a report definition.
ProductName property is mapped to source ReportDefinition named GetProductName
Add event for ProductName property as OnChange -> Post Value, if we are not using this event then changed value will not update to clipboard. So we are using Post value to update the changed value to clipboard. So we can pass Changed Property value to Next ReportDefinition named "GetProductPrice"
ProdPrice property is mapped to source ReportDefinition named GetProductPrice . Parameter for this report definition is ProductName.
Now lets check drop down value by running the flow.
Now price Corresponding to Samsung Lite is displaying in ProductPrice drop down.
Lets change another one value and check in Product Price.
Now you can see the value is changed in Product Price also.
I hope you understand this post😊