This is a Simple POC to implement Cascading drop down. Prior to constellation we used to do a lot of coding to implement this. But now it is just few configurations.
- Create a Data Type say CountryState with fields Type, Key, Parent Key
- Create records – if we select a particular Country then its corresponding State will be displayed.
Type | Key | Parent Key |
Country | USA | |
Country | IND | |
State | West Bengal | IND |
State | Assam | IND |
State | Andhra Pradesh | IND |
State | New Jersey | USA |
State | Washington DC | USA |
There are 3 data pages created
D_CountryState, D_CountryStateList and D_CountryStateSavable but to get the Data view properties while configuring the country and state field in the Data model tab of the case type we need pass the parameter Type and ParentKey
Go to the Parameters tab
Report definition
Now go the App studio — open the case type Demo project and go to the Data model tab and create two picklist properties – Country and State.
Go to Data model and create a picklist field Country – Display as – Drop down list, Picklist options – Data page
select the Data page – CountryState – List CountryState
Create another picklist property State and configure it as of Country but here parent key should be Field and the value should be country – because we need to populate the States as per the selected Country
Now go to the case type – add an assignment – Select Country – State
Click Configure view – add the two fields country and state that we have added in the case type data model tab
Click gear icon of the Country
Enter the Helper text
For the State use a custom logic for the visibility – if Country is not null
Testing
****************************************************End***********************************************