cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter a Gallery by "Does Not Contain" or "Not Like"

I have a Gallery that is connected to a Sharepoint List, and it is filtering based on what is entered into TextInput1 text box. So far the Items property of the gallery is set to :

Sort(Filter('Computer Tracker',StartsWith(Owner_x0020_First_x0020_Name,TextInput1.Text)||StartsWith(Owner_x0020_Last_x0020_Name,TextInput1.Text)),ID,Descending)

 

This is working fine, but I also need to hide gallery entries whose Owner_x0020_First_x0020_Name field is "Discarded". The options I have tried have not worked. Can someone help with this formula?

 

Thanks,

Andy

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

You can try the formula below:

SortByColumns(
    Filter(
        'Computer Tracker',
        Owner_x0020_First_x0020_Name <> "Discarded",
        StartsWith(Owner_x0020_First_x0020_Name, TextInput1.Text) ||
            StartsWith(Owner_x0020_Last_x0020_Name,TextInput1.Text)),
    ID,
    Descending)

In a Filter expression, you can pass multiple conditions, and it will only return those items that match all of the conditions.

View solution in original post

2 REPLIES 2
Power Apps
Power Apps

You can try the formula below:

SortByColumns(
    Filter(
        'Computer Tracker',
        Owner_x0020_First_x0020_Name <> "Discarded",
        StartsWith(Owner_x0020_First_x0020_Name, TextInput1.Text) ||
            StartsWith(Owner_x0020_Last_x0020_Name,TextInput1.Text)),
    ID,
    Descending)

In a Filter expression, you can pass multiple conditions, and it will only return those items that match all of the conditions.

View solution in original post

Anonymous
Not applicable

Thanks! That helped.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (38,669)