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

How to filter Sharepoint List

Hey I would like to filter a Sharepoint List when an icon is clicked. The GalleryList should show the items where the selection column is like "abc".

 

Is there any solution?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to filter Sharepoint List

Hi @Muni1996 ,

Do you want to select columns as filter column dynamically via clicking the corresponding icon?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the Column Selection Icon to following:

Set(SelectionColumn, "Column1")
Set(SelectionColumn, "Column2")
Set(SelectionColumn, "Column3")

...

...

Set the Items property of the Gallery to following:

Filter(
        'Data Source',
        If(
            IsBlank(SelectionColumn),
            true,
            If(
               SelectionColumn = "Column1",
               StartsWith(Column1, "abc"),
               SelectionColumn = "Column2",
               StartsWith(Column2, "abc"),
               SelectionColumn = "Column3",
               StartsWith(Column3, "abc"),
               ...
               ...
            )
        )
)

 

If you typed the "abc" within the TextSearchText box, please consider modify above formula as below:

Filter(
        'Data Source',
        If(
            IsBlank(SelectionColumn),
            true,
            If(
               SelectionColumn = "Column1",
               StartsWith(Column1, TextSearchBox1.Text),
               SelectionColumn = "Column2",
               StartsWith(Column2, TextSearchBox1.Text),
               SelectionColumn = "Column3",
               StartsWith(Column3, TextSearchBox1.Text),
               ...
               ...
            )
        )
)

 

Please consider take a try with above solution, then 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

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: How to filter Sharepoint List

Hi @Muni1996 ,

I am assuming you have a text input box to put "abc" in and you want to click an icon to filter a list.

You don't actually need the icon.

I will call the text box SearchText, the source list in the gallery MyList and the field in this list MatchField

The Items property of the gallery should be

Filter(
   MyList,
   MatchField = SearchText.Text
)

The gallery will be blank until a matching input is made.

If you want the field to match the start of the search text

Filter(
   MyList,
   StartsWith(MatchField, SearchText.Text)
)

In this case, you can make the Default of SearchText "" (double quotes) and the gallery will show all items and then progressively show items starting with letters typed.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item.

 

 

Highlighted
Super User III
Super User III

Re: How to filter Sharepoint List

1. Insert A Textbox and a Gallery.
2. Place this formula on the item property of the Gallery:
Filter (YourtableName,ColumnName=Texbox.text)
3. Now when whatever you type in the textbox would be filtered

If it doesn't work, show your formula or describe your table columns
Highlighted
Community Support
Community Support

Re: How to filter Sharepoint List

Hi @Muni1996 ,

Do you want to select columns as filter column dynamically via clicking the corresponding icon?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the Column Selection Icon to following:

Set(SelectionColumn, "Column1")
Set(SelectionColumn, "Column2")
Set(SelectionColumn, "Column3")

...

...

Set the Items property of the Gallery to following:

Filter(
        'Data Source',
        If(
            IsBlank(SelectionColumn),
            true,
            If(
               SelectionColumn = "Column1",
               StartsWith(Column1, "abc"),
               SelectionColumn = "Column2",
               StartsWith(Column2, "abc"),
               SelectionColumn = "Column3",
               StartsWith(Column3, "abc"),
               ...
               ...
            )
        )
)

 

If you typed the "abc" within the TextSearchText box, please consider modify above formula as below:

Filter(
        'Data Source',
        If(
            IsBlank(SelectionColumn),
            true,
            If(
               SelectionColumn = "Column1",
               StartsWith(Column1, TextSearchBox1.Text),
               SelectionColumn = "Column2",
               StartsWith(Column2, TextSearchBox1.Text),
               SelectionColumn = "Column3",
               StartsWith(Column3, TextSearchBox1.Text),
               ...
               ...
            )
        )
)

 

Please consider take a try with above solution, then 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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,849)