cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Filter/Search

My PowerApp data source is a SharePoint list. I want filter all entries in a column on that list (GM_x0020_Response_) which needs to be sorted by status -- Pending, Disapprove, and Approve. Once sorted, display results in Gallery 2 of my PowerApp.

 

Along with displaying all of the filtered  (GM_x0020_Response_)  the number (HS_X0023_) must also be displayed in Gallery 2 along with status,

 

Screen 1 Layout:

The PA layout consists of Gallery 2 on left side with squares in center of screen listing the current number of Pending, Approved, Disapprove entries within the column. Buttons located below (Pending, Approved and Disapprove) displaying the desired result which would be for example: when selecting the Pending button, all with a pending status will be displayed in Gallery 2 along with the number assiciated with that entry.

 

Any help would be greatly appreciated.  I have tried everything from detailed to simple and so far none of the functions tried work. Out of the hundred plus functions tried, the ones listed below as been the most promising. Very Frustrated!

 

Trial 1:

SortByColumns(Filter(Search('Late Change Request'GM_x0020_Response.text, "Title"),Completed = "Pending"), in Gallery2)

 

Trial 2:

ThisItem.GM_x0020_Response.Value ="Approved"

 

Trial 3:

Search(Gallery2, "Pending")

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Filter/Search

 

You want to click one of the buttons (Pending, approved or declined) and show only those requests, but you also want to keep the search function correct?

 

Can you post what is your Gallery2.Items function so that I can incorporate the action of the buttons.

 

I suggest using some Context Variables to display different lists by status.

 

So your Pending button OnSelect should be this:

 

UpdateContext({_GMResponseFilter:"Pending"})

Now in Gallery2.Item put the following:

 

If(
  IsBlank(_GMResponseFilter),
  Whatever was your Gallery2.Item function goes here,
  Whatever was your Gallery2.Item function goes here + add this condition in Filter() GMResp = _GMResponseFilter
)

You will alos need a reset button to remove filtering only by status.

 

Add a button and in OnSelect put this

UpdateContext({_GMResponseFilter:Blank()})

 

 

View solution in original post

9 REPLIES 9
Highlighted
Anonymous
Not applicable

Re: Filter/Search

Hi @Suep

 

I do no really understand what you are trying to achieve.

 

If you want to sort your list by status you can do it by this function:

SortByColumns(
  YourSharePointList,
  "YourStatusColumn",
)

Now you also want to display the sorted items that also match a textinput for GM_x0020_Response_ column

 

For this you must have a TextInput so that people can enter what value they want to look for.

 

Modify the formula to this:

SortByColumns(
  Search(
    YourSharePointList,
    TextInput.Text,
    "GM_x0020_Response_"
  ),
  "YourStatusColumn",
)

 

Not sure what you want to do with HS_X0023_

 

In your description of Screen 1 Layout you say you want buttons that when pressed only display records with that status.

This is different from what you were talking before.

 

Anyways to have buttons determine what status to show you will need Context Varaibles.

 

in the Button.OnSelect add this:

 

UpdateContext({_FilterStatus:"Approved"})

(Do the same for Pending and Disaproved button)

 

Now in you Gallery.Item put the following:

Filter(
  Search(
    YourSharePointList,
    TextInput.Text,
    "GM_x0020_Response_"
  ),
  YourStatusColumn = _FilterStatus
)
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Filter/Search

Thanks for your reply. To help you see what I want to do, please note the screen shot below. The PowerApp is working great, but it was requested for me to add an extra sort function. I want to see only the files with a GM Response of Pending and displayed in Gallery 2 on the left side.  Do I need to add an extra Gallery? See formula at top of screen shot -- SortPending.JPG

 

 

 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Filter/Search

Thanks for your reply. To help you see what I want to do, please note the screen shot below. The PowerApp is working great, but it was requested for me to add an extra sort function. I want to see only the files with a GM Response of Pending and displayed in Gallery 2 on the left side.  Do I need to add an extra Gallery? See formula at top of screen shot -- SortPending.JPG

 

 

 

Highlighted
Anonymous
Not applicable

Re: Filter/Search

 

You want to click one of the buttons (Pending, approved or declined) and show only those requests, but you also want to keep the search function correct?

 

Can you post what is your Gallery2.Items function so that I can incorporate the action of the buttons.

 

I suggest using some Context Variables to display different lists by status.

 

So your Pending button OnSelect should be this:

 

UpdateContext({_GMResponseFilter:"Pending"})

Now in Gallery2.Item put the following:

 

If(
  IsBlank(_GMResponseFilter),
  Whatever was your Gallery2.Item function goes here,
  Whatever was your Gallery2.Item function goes here + add this condition in Filter() GMResp = _GMResponseFilter
)

You will alos need a reset button to remove filtering only by status.

 

Add a button and in OnSelect put this

UpdateContext({_GMResponseFilter:Blank()})

 

 

View solution in original post

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Filter/Search

Thank you so much for your assistance.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Filter/Search

Thank you for the idea of the reset button. I will add one.
Highlighted
Anonymous
Not applicable

Re: Filter/Search

Good morning,

I am EXTREMELY new to PowerApps and have been tasked with creating a Support App for an upcoming project go live (Friday!).  I am struggling with creating a filter.  I have a Sharepoint List - Go Live Support Issues, that has a Choice Column "Current Status".  I would like to create a drop down that would allow the user to filter the current support cases by the current status.

 

I have read through a host of messages, watched YouTube videos, yet, I cannot get my formula to work properly.

 

Any suggestions???

 

Sharepoint List:  Go Live Support Issues

Column to filter:  Current Status (Current_x022_Status)

Choice Options:  New, Assigned, Completed, Cancelled

 

Any help/direction would be so greatly appreciated.

Highlighted
Anonymous
Not applicable

Re: Filter/Search

Hi @Anonymous

 

What you want is quite simple. Add a dropdown, and change Dropdown.Items to this:

["New","Assigned","Completed","Cancelled"]

Now in your Gallery.Items add this formula:

Filter(Go Live Support Issues,Current_x022_Status = Dropdown.Selected.Value)
Highlighted
Anonymous
Not applicable

Re: Filter/Search

Thank you for the quick response!  I did try this and the dropdown items worked but the filter in the Gallery.Items did not work.

 

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,897)