cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SudhirSingare
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
v-sheyu-msft
Community Support
Community Support

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
v-sheyu-msft
Community Support
Community Support

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (94,262)