Darshan Hiranandani : How to Bind a Dropdown Element to a List Rows Datasource in App Builder?

Hi everyone,

I’m Darshan Hiranandani, building a page in App Builder for managing new orders in a restaurant, and I want to populate a dropdown list with values from an existing table (datasource). The idea is to dynamically bind the dropdown to the list rows in the table so that users can select options based on the data.

However, I’m struggling to find a way to bind a dropdown element with the key-value list of the table.

Has anyone here worked with this feature? Is there a recommended method to achieve this in App Builder?

I would really appreciate any guidance or suggestions you have!

Thanks in advance!
Regards
Darshan Hiranandani

Hi @darshanhiranandani23, have you tried the Choice element? Would that meet your needs?

They way I have implemented it is this:
I have a page with a form for the record, with some fields using a Record Selector object for the field that will store the result of the dropdown selection.
image

I have a reference table that is the source for the dropdown.
image
(I added an order field so I can control the order in the dropdown, used in the datasource’s Sort.)

There is a datasource to add this table to the page in addition to the table for your forms data.
image

This populates the default values of the Record Selector, and I found its important to use the 0 record and not All for some reason for it to work, passing in the record ID.
image

Then in the form event I update the froms table with the record select as ususal.
image

Back in the table storing the result of the Record Selector, its a link to the reference table, so that the ID stored links to the reference tables value.

image

By doing this I can use the one reference table to populate multiple dropdowns, in this case, 4 fields, if they are the same (or use filters to provide subsets, etc). Easier to maintain long term over a Choice field. You just have to remember to not delete a record from your reference table, and just use a flag to archive it instead if necessary, so you don’t break your referential integrity.

Hope that helps a little. :blush: