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

Filter function seems correct, but gallery items do not filter properly?

Hi community, 

 

Can someone explain me where I went wrong? How come other items do not disappear when filtering through searchbox?

tempsnip.png

My formula:

 

 

ForAll(
Distinct(
'Updates', Summary),
LookUp(
SortByColumns(
Filter('Updates', Required = "Y", 
StartsWith(WorkInstructionNumber,TextSearchBox114_1.Text) || StartsWith(UnitDescription,TextSearchBox114_1.Text) || StartsWith(Location,TextSearchBox114_1.Text)), "Title",If(SortDescending1,Ascending,Descending)), Summary = Result))

 

 

 

 

I want the gallery to show me items with distinct values from column Summary (after filtering column Required = "Y") and to be able to filter through a couple of other columns WorkInstructionNumber, UnitDescription and Location via Searchbox.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Alex_10
Super User
Super User

@MashaOvchar 

 

if you are sure that your provided formula works well:

Filter(
    ForAll( Distinct('Updates', Summary),
        LookUp(
            SortByColumns(
                Filter('Updates', 
                    Required = "Y", 
                    StartsWith(WorkInstructionNumber, TextSearchBox114_1.Text) || StartsWith(UnitDescription, TextSearchBox114_1.Text) || StartsWith(Location, TextSearchBox114_1.Text)
                ), 
                "Title", If(SortDescending1, Ascending, Descending)
            ), 
            Summary = Result
        )
    ),
    Summary <> Blank()
)

 

 

View solution in original post

2 REPLIES 2
Alex_10
Super User
Super User

@MashaOvchar 

 

if you are sure that your provided formula works well:

Filter(
    ForAll( Distinct('Updates', Summary),
        LookUp(
            SortByColumns(
                Filter('Updates', 
                    Required = "Y", 
                    StartsWith(WorkInstructionNumber, TextSearchBox114_1.Text) || StartsWith(UnitDescription, TextSearchBox114_1.Text) || StartsWith(Location, TextSearchBox114_1.Text)
                ), 
                "Title", If(SortDescending1, Ascending, Descending)
            ), 
            Summary = Result
        )
    ),
    Summary <> Blank()
)

 

 

@Alex_10 Yes! Thank you!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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