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

Filter data source on column name

I would like to add a screen to my app where a user selects names from a gallery, then make a single selection from a drop down which correlates with column names in the data source. The names and the selected column would be added to a collection and displayed in a table.

 

I've already got the gallery and drop down in place, but how do I reference the selected column to add it to the collection without a lengthy IF() statement?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter data source on column name

Hi @Caroline ,

Do you populate the Dropdown box with column names from your data source?

Do you want to add data into a Collection based on the name and the selected column?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps currently. The column names within the Dropdown box would not be recognized a actual column name from your data source, instead, it would be recognized as a text value.

 

As an alternative solution, I agree with your thought. Multiple If functions may be available choice for you. Please consider take a try with it, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

5 REPLIES 5
King
Level: Powered On

Re: Filter data source on column name

Hi @Caroline  if you want to refer to a selected item in a gallery the code is as follows

 

Gallery.Selected.ColumnName

 

Caroline
Level: Powered On

Re: Filter data source on column name

@King I've got the gallery reference sorted out, it's referencing the data source column based on the column name selected in the drop down that I can't figure out.

 

EG.

Drop down has selections such as email address, cell phone, ethnicity etc. I want to user to be able to select which one they want, and it will add the field of same name from the data source to the table. Thereby producing a table that shows a list of names (from the gallery) along with their email adresses/phone numbers etc (from the drop down). 

King
Level: Powered On

Re: Filter data source on column name

Hi @Caroline  can you show me screenshots

Caroline
Level: Powered On

Re: Filter data source on column name

@King Here you go. So the user selects the person from the gallery on the left, then chooses the columns they wish to see in the table. They would use the chevron to add the details to a collection which is displayed in the table.

 

ReportSelection.JPG

Community Support Team
Community Support Team

Re: Filter data source on column name

Hi @Caroline ,

Do you populate the Dropdown box with column names from your data source?

Do you want to add data into a Collection based on the name and the selected column?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps currently. The column names within the Dropdown box would not be recognized a actual column name from your data source, instead, it would be recognized as a text value.

 

As an alternative solution, I agree with your thought. Multiple If functions may be available choice for you. Please consider take a try with it, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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
thirdimage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 251 members 5,242 guests
Please welcome our newest community members: