How to populate dropdown field from reference table in Pega constellation?

I have a dropdown property which is used in 2 different case types . It is a dropdown property with values different according to case type. I have a reference data type created to source the dropdown property based on casetype. I would like to source the dropdown using the data page from my reference data. How this can be achieved in constellation?

@Balasubramaniam

In the App Studio, go to View and add a Picklist field and then use the list data page as the source for the list.

You can also create a Data Reference type referring to your reference data type and that proeprty can fetch the list and can be used as source to a picklist

Pls refer to the below articles -

@RaviChandra ,

Thanks. We have created as picklist type and provided data page as table type in property. The challenge here property will be referring the data page of my reference data type which requires a parameter to capture the casetype value so that values corresponding to that alone will be fetched. I need the values to be passed dynamically to the data page whenever the property is referrred in any of the casetype so that it pulls only respective values for the dropdown.

For eg. Let’s take property A which is a dropdown property used in two different case type C1 and C2. Let’s assume in C1 casetype this property should fetch two values from reference data type which we have configured.Similarly same property A referred in C2 casetype has to fetch 3 values from reference data type.

property A is created in work class so that both casetypes can access it. i want this property to be of dropdown type in both case type with referring to the Parameterised data page of reference data type(in data class) .

@Balasubramaniam

You can use the pxObjClass as a differentiator amongst your case types in your datapage if you dont want to pass the parameter for a data reference proeprty you created in work- class. and all your respective cases would automatically use the specific run time classes w.r.t. the case type to differentiate the results

@Balasubramaniam

If you want to populate a dropdown (picklist) in Pega Constellation from a reference table, here’s a simple approach:

  1. Create a Data Type

    • Example: CountryState, with fields like Type, Key, and ParentKey.

    • This table will hold all dropdown values (e.g., countries and states).

  2. Create a Data Page

    • One Data Page (e.g., D_CountryStateList) to return all values.

    • Another parameterized Data Page (e.g., LookupStatesByCountry) to return filtered values based on the selected country.

  3. Configure Picklist Fields

    • Add picklist fields in the case type’s data model.

    • For Country, source values from D_CountryStateList.

    • For State, source values from LookupStatesByCountry and pass the selected Country as a parameter.

  4. Use Cascading Behavior

    • Place both picklists on your view.

    • When the Country changes, the State dropdown updates automatically.

Benefits:

  • No custom code needed.

  • Works across web and mobile.

  • Easy to maintain.

This method works well for both simple dropdowns and cascading dropdowns in Pega Constellation.

(Sharing this from my notes while researching for Get Tech Bite.)

@Balasubramaniam

Create a reference data type with columns like CaseType, Code, and Label, and load a few sample rows. Build a list data page, say D_GetDropDownOptions, sourced by a report or lookup on that data type and add a parameter CaseType. In the data page filter, use CaseType = Param.CaseType so it only returns rows for that case. In each case type’s view, use a Picklist (Constellation) bound to your property and set Options source to Data source → Data page → D_GetDropDownOptions. Map Option value to .Code and Option caption to .Label. Pass the parameter by setting CaseType = pyWorkPage.pyCaseType (or your case type name property) in the picklist configuration. Mark the data page as “Reload if stale” and set an appropriate refresh strategy. Reuse the same data page across both case types by passing different CaseType values, so the dropdown shows case-specific choices automatically.