2

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.

choba78
  • 361
  • 3
  • 5
  • 13
  • For me better answer in https://stackoverflow.com/questions/39490200/how-to-set-the-default-value-of-a-dropdown-in-powerapps Here how applied: [how to bind DropDownList](https://i.stack.imgur.com/M9zoV.png) – Humberto Espinosa Mar 21 '19 at 18:30

2 Answers2

2

Try

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

or

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

Hope this helps.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
0

Solution was to put the table name as it appears under data sources in single quotations

'[dbo].[MyTableName]'

choba78
  • 361
  • 3
  • 5
  • 13