cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbjb247 Helper II
Helper II

Searching a table to return records with any one of a few criteria

Hi all 🙂

 

I'm asking PowerApps to:

  • Look at Table 1
  • Return records with SW1 in them
  • From the postcode (zip code) column

 

 

Search(Table1,"SW1","Postcode")

 

 

 

This works, giving me all the SW1 records.

 

What I need is for it to return (for example) SW1, SW2 or SW3 - so a bigger list containing any records from a few different postcodes (basically this kind of thing) - it's the bit inside of the stars that I'm struggling to sort out.

 

Search(Table1,   ***  "SW1"  OR  "SW2"  OR  "SW3"  ***  ,"Postcode")

 

 

... I've tried playing around with OR statements with not much luck.

 

Any help much appreciated thanks 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Searching a table to return records with any one of a few criteria

@jbjb247 

The SEARCH function cannot be delegated in SharePoint so you might want to use a different function instead.  This will allow you to search Table1 beyond 2,000 records.

 

I would suggest a combination of FILTER + STARTSWITH instead which can be delegated.  It would look something like this.

Filter(
    Table1, 
    StartsWith("SW1","Postcode")
    Or StartsWith("SW2","Postcode")
    Or StartsWith("SW3","Postcode")
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Searching a table to return records with any one of a few criteria

@jbjb247 

The SEARCH function cannot be delegated in SharePoint so you might want to use a different function instead.  This will allow you to search Table1 beyond 2,000 records.

 

I would suggest a combination of FILTER + STARTSWITH instead which can be delegated.  It would look something like this.

Filter(
    Table1, 
    StartsWith("SW1","Postcode")
    Or StartsWith("SW2","Postcode")
    Or StartsWith("SW3","Postcode")
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

jbjb247 Helper II
Helper II

Re: Searching a table to return records with any one of a few criteria

Thank you 🙂

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,989)