How to create two cascading dropdown where both dropdown value coming from Rest API
0
Suppose I have two dropdown Country and State. Based on the country selection state will populate. and all the value of state and country drop down will come from rest api. I have a form of employee details, where I want to put these two drop down ,state and country. Give me solution how to to populate these two dropdown value and also how to save selected state and country of employee.
asked
Piyali Basak
1 answers
0
If the REST API is external source
You must first consume the REST, by creating a JSON mapping, Import mapping, entity definitions needed etc
Call the REST service, with the import mapping fill the data in your database
Then with Reference selectors you will be able to show the data
If the REST API is within the same Mendix app (I am very much hoping its not)
Then you must already have the data
Use Reference selectors to show the data
For your mapping to work;
Country entity and State entity should be associated to each other