cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pedromoreno
Level: Powered On

Data from SQL Datasource to Dropdown Box (Filter and Select column)

If i have a Dropdown with the following items Fx: '[dbo].[tblTestes]'

It list the primary key (Code) in the dopdown.

 

tblTestes has the following columns:

Code

Name

Surname

Phone

 

How can i:

A - list the second column (Name) instead of the (Code) column

B - List the (name) column but filter all the results to a specific (Surname)

 

Thanks

 

1 REPLY 1
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Data from SQL Datasource to Dropdown Box (Filter and Select column)

For the first part: open the Advanced view in the right-side pane, and under "Items", you can choose the value that will be displayed in the dropdown. By default it chose the code column, but you can change it to display what you want (in your case, 'Name'), as shown below.

ForumPost001.PNG

 

For the secoond part: you can filter the data source using any column. For this example, I have a text input that the user can type to filter the data based on the surname. In the code below I used the Search function, but you can use the Filter function as well.

If(
    IsBlank(TextInput1.Text),
    '[dbo].[tblTestes]',
    Search('[dbo].[tblTestes]', TextInput1.Text, "Surname"))

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,131)