Selectbox feeded by query (?)

I tried many ways but could find the way to do that. I want to create select box list and data in the list will be feeded by query.

For example there is three column table ID,CITY,CODE and i want to just show code in select list.

is it possible to do that?


Here is an example of how to do that:

If your a doing a normal query, you would just use {{}}

Value would be your ID and the label would be CITY.

Here are the docs on using the Option Lists

Hi Brad, Thanks for you answer but i could not see the same screen in Mobile App zone. I think this is for web (?)

I apologize, I did not notice that this was for the Mobile forum! Well, now I feel obligated to figure this out!

I do not see a component called Select Box List. I assume you meant the Select component, then this works like the old version of the Select component which does not use the Options List.

This does required that your data be in Object or Arrays format rather the Array of Objects format so it should look like this:

ID: [1,2,3],
CITY: ["San Fransico", "New York", "Chicago"],
CODE: ["SFO", "NY", "CHI"]

If it doesn't then yo need to do use formatAsObject() to transform it. By default a DB query will format the object correctly.

If you are using one of the Collection Components, it will work the same the same as desktop which I showed you.