Question
Cognizant
IN
Last activity: 5 Jun 2024 17:51 EDT
We have 2 dropdowns Country and state now as soon as I change the country my state value should populate corresponding to the country.But we need to use 1 data page as a source.
We have 2 dropdowns Country and state now as soon as I change the country my state value should populate corresponding to the country.Like Countruy=India,State values should be=Karnataka,Jharkhand etc But we need to use 1 data page as a source.Is it possible to achieve this way by using a single data page only for 1 dropdown?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 24 Jun 2024 10:25 EDT
Rulesstack Private Limited
IN
Maantic Inc
IN
Yes, if you both country and state in same table then a simple data page will do passing correct parameters. You can also use 2 reports on the same data page, differentiated by when rule.
Eclatprime Digital Private Limited
AU
Hi @TanyaS58, As @SohamM95 said, we need to have country and state both in single data table when you want to write single Data page. Define 2 report definition sources for a single data page with when conditions(when country=="" and country has value). Thanks
Pegasystems Inc.
IN
@TanyaS58 - For the country dropdown will pass source as data page without any specific parameters. On change of country will add a refresh this section and will populate state dropdown.
State dropdown is sourced to same data page but the parameter need to be passed as country value. In data page rule add the report definition as the source with parameter as country to fetch the results filtered by that country.
Thank you.
Eclatprime Digital Private Limited
IN
Hi @TanyaS58
We can achieve this by using the Data page, in this data page, we have to use two Report definitions as sources. By using the first Report Definition we have to fetch the Country value without passing any parameters. In the second report definition, we must pass the country value as a parameter to filter out the state's corresponding country. In the Data page configuration we have to give two sources and use the when condition.
TSPI
US
Hi,
Please try this way,
Create a reference data type with the fields as "Purpose" and "Value", In purpose enter the country names and in Values enter the State names. Create a Data Page and pass the filter according to your requirement and refer the Data Page in the required dropdown property. You will get the results as per your requirement.
Regards,
Poojitha Behara.
Accepted Solution
Updated: 24 Jun 2024 10:25 EDT
Rulesstack Private Limited
IN
Cognizant
IN
@Ajay Kumar Atmakur thanku for a clear explaination.