I have a form with different fields. One field is a select component, which values should be different by context of the form. So i use a javascript as a data source for this select component.
Based on context i want to trigger totally different postgresql queries (different tables, different joins) to fill the values. If you want a factory approach.
In my first step i simply try to run one query within the javascript and return it to the select component, but i get "The selected data source is empty or could not be converted to an array." In JS console the data is not empty, so i guess that the format is not matching. I tried formatDataAsArray and the map function in different styles but i missed something and its not working.