cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Suep
Level 8

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
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
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
)
Suep
Level 8

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
Suep
Level 8

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

 

 

 

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

Suep
Level 8

Re: Filter/Search

Thank you so much for your assistance.

Suep
Level 8

Re: Filter/Search

Thank you for the idea of the reset button. I will add one.
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.

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)
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
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: 405 members 6,126 guests
Recent signins:
Please welcome our newest community members: