cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
barnesjr
New Member

Searching gallery after it has been filtered

Hi everyone,

 

I'm building my first app and I can successfully filter the gallery control using the below

 

Filter(
    Pipeline,
    Archive = false && (StartsWith(
        'Sales Stage',
        "01"
    ) Or StartsWith(
        'Sales Stage',
        "02"
    ) Or StartsWith(
        'Sales Stage',
        "03"
    ) Or StartsWith(
        'Sales Stage',
        "04"
    ))
)

 

 

Now that I have the filtered list from SharePoint I need to search for a specific record based on a string within the PowerApps column 'GovCon Opportunity: GovCon Opp Name' which maps to 'GovCon_x0020_Opportunity_x003a__'.

 

I'm storing the textbox.text in a variable named SearchVar, but when I wrap the filter in a search method the gallery shows no records even though I copied the search string from a record in the gallery.  I've also tried using with() to filter it with the same results.  Lookup won't work as there are multiple records that would have the same code.

 

Any help is greatly appreciated.

 

Thanks,

 

John

 

1 ACCEPTED SOLUTION

Accepted Solutions
KroonOfficeSol
Resident Rockstar
Resident Rockstar

@barnesjr,

You shouldn't use the Search() function with SharePoint, because this is not supported for delegation. Also you don't need the variable. Try this:

Filter(
    Pipeline
    , Not(Archive)        
    ,Or(
        StartsWith(
        'Sales Stage',
        "01"
        )
        ,StartsWith(
        'Sales Stage',
        "02"
        )   
        ,StartsWith(
        'Sales Stage',
        "03"
        )
        , StartsWith(
        'Sales Stage',
        "04"
        )
    )
    , Or(
        IsBlank(TxtInput.Text)
        ,Startswith(Column, TxtInput.Text)
    )
)

View solution in original post

2 REPLIES 2
KroonOfficeSol
Resident Rockstar
Resident Rockstar

@barnesjr,

You shouldn't use the Search() function with SharePoint, because this is not supported for delegation. Also you don't need the variable. Try this:

Filter(
    Pipeline
    , Not(Archive)        
    ,Or(
        StartsWith(
        'Sales Stage',
        "01"
        )
        ,StartsWith(
        'Sales Stage',
        "02"
        )   
        ,StartsWith(
        'Sales Stage',
        "03"
        )
        , StartsWith(
        'Sales Stage',
        "04"
        )
    )
    , Or(
        IsBlank(TxtInput.Text)
        ,Startswith(Column, TxtInput.Text)
    )
)

View solution in original post

barnesjr
New Member

Worked like a charm!  Way easier than I thought it would be.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (53,881)