cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krs10s6
Advocate I
Advocate I

Creating an FAQ - Filter Screens Based on Categories

Hi everyone, 

 

I am new to the PowerApps world - so far I am loving it but am looking to add some complexity into the app I am building. I am creating an FAQ app to use for a project. I've created a SharePoint List with fields for Questions, Answers, and Categories. I would like to create different "views" based off of the category that is selected from a drop down list (four choices: Customer Service, Account Service, General and Website). I've created four screens that correlate to the categories (similar to what I think of SharePoint Views).

 

When thinking similar to an If/Then statement, I am thinking along the lines of "If Category equals Customer Service, then View all Customer Service questions on the Customer Service Screen."

 

Is there code out there that would let me do this? I've done a bit of research and am having no luck finding something close to what I am looking to do. 

 

Thank you all in advance for your assistance! This PowerApps newbie really appreciates it! 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Community Champion
Community Champion

Ok, then the drop down control should have the Items property set as follows:

["Customer Service",  "Account Service", "General", "Website"]

And the gallery should have the Items property set as follows:

Filter(MyFAQlist, Category.Value = Dropdown1.Selected.Value)

where MyFAQlist is the name of your SP list of FAQ

View solution in original post

10 REPLIES 10
Meneghino
Community Champion
Community Champion

Hi @krs10s6

 

It is difficult at first but you need to change a bit the way you think when dealing with PowerApps.

 

What you are trying to do can be achieved with a single screen.  This screen would contain just a dropdown to select the category and a gallery to display the results.  By using a Filter function in the Items property of the gallery, the displayed results will refresh automatically when the dropdown selection is changed, without the need for code to run.

 

The specific solution depends on the type of column of Category in your FAQ list.  Is it text, choice or lookup?

Hi @Meneghino,

 

Thank you so much for your insight.

 

The "Category" column type is a choice.

 

Thank you so much for your help! 🙂

Meneghino
Community Champion
Community Champion

Ok, then the drop down control should have the Items property set as follows:

["Customer Service",  "Account Service", "General", "Website"]

And the gallery should have the Items property set as follows:

Filter(MyFAQlist, Category.Value = Dropdown1.Selected.Value)

where MyFAQlist is the name of your SP list of FAQ

@Meneghino it worked!!! 😄

 

Thank you so much for your help! I am so happy!

 

Have a great weekend!

Meneghino
Community Champion
Community Champion

You are welcome

Hi @Meneghino

 

I have a follow up question for you. The solution above works great and I am really excited about it but I wanted to see if the following is possible. 

For our Q&A page, my team would like to add a second category to search from - since questions can apply to two different categories and my understanding is that PowerApps will not recognize multiple selections from one column list. For example, many of my questions are related to Customer Service as well as Account Services. I want to be able ensure that these questions come up when either are selected in the drop down that is created. 

 

I tried to add a second filter into my gallery items but am having trouble getting it to work. My categories are the same in both columns. 

 

Thank you so much again for your help! 🙂 

Meneghino
Community Champion
Community Champion

OK, there a number of ways you can do that.

Here is an idea, create a list box instead of the drop down control.

Then do this:

 

ListBox1.Items = ["Customer Service",  "Account Service", "General", "Website"]

Gallery1.Items = Filter(MyFAQlist, Category.Value in ListBox1.SelectedItems.Value)

Where the left hand side of each equation shows you the property to set.

 

Please let me know how you get on.

Hi @Meneghino

 

I did try the list box suggestion and while I understand it, I am not sure it fits what I am looking to do since not all questions fall into both categories.

 

In browsing the PowerApps ideas forum, I did see that it is planned for PowerApps to start recognizing multiple selection columns from SharePoint as a solution soon. In the meantime, my fix is that I have a second category field (titled category 2) that is designated for specifically for my Account Services category and have adjusted my code accodingly:

Filter('Frequently Asked Questions: CSC', Category_x0020_2.Value = Dropdown2.Selected.Value)

While not ideal, it is a good temporary fix until PowerApps recognizes multiple selections. 

 

I did manage to accidentally delete my search functionality for searching text in my gallery and am having difficulties adding it back in with the filter function in place for flitering categories. Any suggestions? 

NewbieMSPA
New Member

Please help!!  I am new to Power Apps and have seen a FAQ on SharePoint with buttons labelled different categories of FAQ's.  I have created a FAQ Excel workbook and uploaded it into site contents, but now need help on creating category buttons, and....when typing in the FAQ in the search bar, a automatic list appears in relation to your question...

 

Please can someone help or URL me some guidance? Please....Please?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,288)