Hi Team,
I have an Employee Registration Form with three dropdowns:
Country → State → City (cascading dropdowns).
On Create, everything works fine: when I select Country, State refreshes; when I select State, City refreshes.
But the issue is with Edit/Update:
When I open an existing employee record, the saved Country, State, and City values are not automatically selected in the dropdowns.
Country is showing, but State and City are not pre-filled unless I change the dropdown again.
When I edit an employee record, the dropdowns should automatically show the previously saved Country, State, and City without user interaction.
"I have attached a small oml with my Employee Registration form for reference"
Can anyone suggest the best way to handle this scenario.
Hello.
When editing, the screen variables aren't aware of the Employee choices.
After fetching Employee, assign values to the screen variables. Only after the values are set, you can fetch data for countries/states/cities. This way the filters will work as you want them to, and the selected option will be the right one in all three dropdowns.
Hello @Thimmisetty surendrababu ,
For that usecase you need to fetch data based on previous selected country and all values of state with that country and also all values from city with that state.
You also need to select by default previous selected values of all
If user change country then you refresh and fetch the all data again state and city
Overall you need to prepare city state and country list before page render that you bind with that dropdowns