How to bind a datasource to a dropdown in PowerApps

choba78 picture choba78 · Sep 14, 2016 · Viewed 10.4k times · Source

How do you bind a datasource to a dropdown in PowerApps.

I have connected my Azure table to my PowerApps app so that the tables appear in my Data Sources.

I then added a dropdown control to my form.

In my Items property I can have list values hardcoded e.g.

Table({ColorName:"red"; ID: "1"};{ColorName:"green"; ID: "2"}{ColorName:"blue"; ID: "3"})

but I want to link it to my DataSourceTable values that has "ID" and "ColorName" columns.

According to this help page I just need to put my tablename in the Items Property but this doesn't work.

Answer

user7002376 picture user7002376 · Jan 30, 2017

Try

Dropdown1.Items = Distinct(DataSource, ID) for ID Dropdown

or

Dropdown1.Items = Distinct(DataSource, ColorName) for ColorName Dropdown.

Hope this helps.