cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
panda
Helper I
Helper I

filter gallery from sharepoint list choice column

i am trying to create a filter on a gallery to filter on the values of the Status column from sharepoint list.

The sharepoint list column is named Status.  And the choices are "Awaiting Management Approval","Rejected", "Approved" in this column on the list.  

 

How do I create a filter on my powerapps gallery to filter for those words in the Status.

 

Example in the filter if I type "Approved" in the filter then the fields I created in the gallery will populate this information.  

 

 

17 REPLIES 17
v-siky-msft
Community Support
Community Support

Hi @panda ,

 

So you change to use Dropdown to select the choices, rather than Textinput box, right?

If so, I think the Items property of Dropdown should be set to Choices('SP'.Status), then modify the Gallery,Items as follows.

Filter('SP list', Status.Value=DropdownName.Selected.Value)

 

Hope this helps.

Sik

I finally got it to work.  I filtered on the gallery as follows Filter(vltest, Status.Value=dropdown2.Selected.Result)

 

 

This was very helpful. Thanks!

Anonymous
Not applicable

Hi, where do i need to set this -->  the Items property of Dropdown should be set to Choices('SP'.Status). Do, i need to hard code the whole gallery?

FYI, the code item that i apply for my gallery now is -> SortByColumns(Filter([@'SENARAI ASET UNIKL'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))  
because i have search textsearchbox also.

 

I try to apply this on my dropdown , Filter('SP list', Status.Value=DropdownName.Selected.Value) however, at last part selected.value, i try to insert the word value, but it can't work.

hehe, can you help me? 

thank you

Thank you!  I've been working on this for 2 weeks off and on.  Even recreated my data (small databases) and started over on my app.  I finally have it working!

Ross85
New Member

I'm hoping someone can help with this issue. I have implemented this formula below

 

Filter('Task Template',ExType.Value=EventType_DropDown.Selected.Value) 

 

Please see picture Gallery_Filter attached. 

 

This does not actually filter the Gallery at all, its just blank. My list is called 'Task Template' and the Column I want to filter is a choice Column, the choice Column can have multiple selections. as per the picture attached ExType, I do get the delegation warning but the list is only 50 items.

 

Can someone please help me solve this issue. I have uploaded some pictures that I hope may help. 

 

Thank you in advance

 

 

 

 

FollowTheLion
Frequent Visitor

If you want to dynamically filter using a drop-down, then this question has been answered.

If you want to automatically filter a gallery based on pre-set list of specific choice values within a choice column (hard-coded), then the solution I figured out was to create a View for the Dataverse table that had a Filter on that column.  In this case, you're presented with a checkmark list and you can simply select the choice values that you want to include.  Then you can use the Filter() function in PowerApps to filter based on view.

(This may not be quite what was being asked for in this question, but it was what I was trying to do.)

So, if you always want to limit the content in the gallery based on a pre-set (hard-coded) list of choice values, then this is the method.

Create new View for the Table.  Select relevant columns.  I’m not sure if it matters much which columns you select if you’re just using it for filtering, but you will for sure have to include the choice column in question.  Then click on the filter in the column header for that column and select the choices to be included in this view.

Save and publish.

Go back to PowerApp (you'll probably have to close your app and reopen for the new view to show up).

Click on your gallery and change items from YourTable to:

Filter(‘Your Table’, 'Your Table (Views)'.‘New Filtered View’)

(Note that single quotes are optional based on whether you have spaces in the names, except for ‘Your Table (Views)’, since it will have spaces.)

 

For me, it was basically for showing the user records that were not completed.  In my case, I had three choices that were along the lines of "In Preparation", "In Progress", "Complete" (mine we a little different, but the idea was along these lines).  I needed the first two options to show in the list but the Complete items to be hidden.  I created a new view and called it Incomplete, and then changed the filter for that column so that "In Preparation" and "In Progress" were checked, and "Complete" was not checked.  When I filtered the Gallery, instead of trying to type an expression like column = 'value', I used the view as the filter.  It worked perfectly.

If you add more choices then you can edit the View later so that the new choices can either be included or excluded in the View.

 

I hope this helps someone that is looking for a hard-coded filter, rather than user-selectable.

v-siky-msft,

I used your suggestion above and it solved the gallery issue I was working on for 3 days. Thank you. 👍

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (1,745)