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
CarlosFigueira
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
CarlosFigueira
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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,803)