web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search when string has...
Power Apps
Answered

Search when string has comma

(0) ShareShare
ReportReport
Posted on by 27

Hello all,

I have a search that’s pulling from a SharePoint list with the column being name

for example Smith, John

 

Filter(list, startswith(NAME, textsearchbox1.text)

 

this works but will only search for last name since the first name is separated by the comma

 

is there a way to search both last name and first name by adding something that says to keep going after the comma? Or even a ‘contains’ rather than ‘startswith’ I looked around and couldn’t find anything specifically on this issue. 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Skirjames 

    You can but you will encounter a  delegation warning. Depending on the size of your list, the search may not find all the matches.

  • Skirjames Profile Picture
    27 on at

    @Drrickryp @Thank you sir, I tried replacing contains with startswith and it was giving me errors, any suggestions? The list is less than 500

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Skirjames 

    Filter(list, textsearchbox1.Text in Name) will find matches to any combination of letters in the Name column including the first name. PowerApps will show a warning that it will work on the first 500 records. You can increase this up to 2000 in the advanced settings.

  • Skirjames Profile Picture
    27 on at

    @Drrickryp thank you but I have filter(list, textsearchbox1.text in Name) and it’s erroring invalid argument type 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Skirjames , 

    Make sure that the case is correct in your formula.   textsearchbox1.Text also what type of column is Name

  • Skirjames Profile Picture
    27 on at

    Yes, my formula worked before no problem with startswith but now using in name isn’t working at all. Saying the error is with the logical test. Data type control 

  • Verified answer
    Skirjames Profile Picture
    27 on at

    I couldn’t get the “in” to work so I just added an EndsWith and threw in Name and that works for things after the comma. Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard