Thursday, 28 March 2019

Cascading Drop Down in Pega

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.

  1. Local Data Table
  2. Two Report Definition
  3. Flow
  4. Flow Action
  5. Section
  6. 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😊

8 comments:


  1. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles pega certification

    ReplyDelete
  2. thanks for giving good information we can thought your websitepega online traning

    ReplyDelete
  3. you forgot screenshots of how to edit parameters tab, please add it, otherwise super article.

    ReplyDelete
    Replies
    1. Yeah i forget to add that screenshot. Without specifying the parameter in parameter tab also the report definition will work in that scenario. Incase paramter value is not passed dynamically then we can add that parameter in report definition. Thank u.

      Delete
  4. Hi Bharathan,
    Thanks for giving cascading example information.
    will you post same cascading example by using data pages which is going to select Multiple parameters? (As per your example Replace Product Name as Countries, Product Price as States then While it selected India as a country and it has to show all the states that belongs to India)
    Thanks in Advance

    ReplyDelete
    Replies
    1. Hi Vijay Bhaskar,

      I think With Data Page alone we can't able to achieve this.

      We have to create 2 Data Page, Assume
      D_GetCountryList
      Inside this data page we have to map a report definition
      to get the distinct Country in table.

      In Work class section , we have to use a country drop down
      property for this property we have to provide the created
      data page as source.

      D_GetStateList
      Inside this data page we have to map a report definition
      to get distinct state.

      We can use Keyed Data Page concept to get the list of
      State based on selected country.

      Let me know if you want to create this as a post.

      Thanks,
      Bharathan.

      Delete
    2. Hi Bharathan,
      Thanks for the information,
      If possible please create this as a post as you mentioned earlier

      Thanks in advance,
      Palle Vijay Bhaskar Reddy

      Delete
    3. Hey Bharathan,
      A post would be really helpful, I love your content!

      Delete