cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
caballar
Level: Powered On

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
PowerApps Staff CarlosFigueira
PowerApps Staff

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

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
PowerApps Staff CarlosFigueira
PowerApps Staff

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

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

caballar
Level: Powered On

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

Thanks! That helped.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,895)