cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pedromoreno
Regular Visitor

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
CarlosFigueira
Power Apps
Power Apps

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
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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,445)