cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to bind key and value to dropdown from data source ?

Currently I am binding direct text values to drop downs using to dropdowns items attribute : Distinct('SQLTablename',ColumnName) This binds ColumnNames to both value and text. I need for eg. "ID" as value and "ColumnName" as text. Can anyone help me with this ?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to bind key and value to dropdown from data source ?

Hi @SudhirSingare,

 

Do you want to display the values in dropdown control ?

 

Distinct('SQLTablename',ColumnName)  can only return the values of the specified column.

 

I made a test.

19.PNG

when you want "ID" as value and “ColumnName” as Text , you can set Items property of dropdown control to :

Filter('[dbo].[SQLTablename]',column1="1")

Under Value property of dropdown control ,you can choose the column name you want to display.

 

If you want to display 'ID' column values , you can set Items property of dropdown control to :

Filter('[dbo].[SQLTablename]',column1="1").ID

Regards,

Eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: How to bind key and value to dropdown from data source ?

Hi @SudhirSingare,

 

Do you want to display the values in dropdown control ?

 

Distinct('SQLTablename',ColumnName)  can only return the values of the specified column.

 

I made a test.

19.PNG

when you want "ID" as value and “ColumnName” as Text , you can set Items property of dropdown control to :

Filter('[dbo].[SQLTablename]',column1="1")

Under Value property of dropdown control ,you can choose the column name you want to display.

 

If you want to display 'ID' column values , you can set Items property of dropdown control to :

Filter('[dbo].[SQLTablename]',column1="1").ID

Regards,

Eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,921)