How to bind api data to dropdown

Hi Mendix Team, I created a form in mendix studio pro 10.3, In the form I have a dropdown but there is no option to direct bind the api data to dropdown. There is an option called Enumeration,But how to bind the api data to the enumeration.  
1 answers

Hey Vinay!


Mendix is a very powerful development platform, but it’s different from most other front-end only platforms, like Angular, in that you can’t directly map JSON to a given widget on a page. That page needs to be in the context of an object or objects.


I’d recommend calling the API prior to landing on the page, associating the response list to a helper object that will be the main context on the page, and creating a secondary association that you can then set on the page using a reference selector widget. This is a solution I’ve used in the past, and it’s worked well.

I hope this helps and makes sense,