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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter by column 'Firs...
Power Apps
Answered

Filter by column 'First Name' and 'Last Name' when full name is searched

(0) ShareShare
ReportReport
Posted on by 131

Hi, I am trying to filter by column 'First Name' and 'Last Name' when full name is searched.

So when I am typing a full name when I start with a first name or last name its fine:

simondpalmer_0-1649868508597.png

BUT when I type the entire full name it comes up empty:

simondpalmer_1-1649868622179.png

What I have at the moment is:

SortByColumns(Filter([@'Contacts Database'],StartsWith('First Name', TextSearchBox1.Text) || StartsWith('Last Name', TextSearchBox1.Text)||StartsWith(Company,TextSearchBox1.Text)),"Title",If(SortDescending1,Ascending,Descending))

I have tried reversing the StartsWith like:

SortByColumns(Filter([@'Contacts Database'],StartsWith(TextSearchBox1.Text, 'First Name') || StartsWith(Company,TextSearchBox1.Text)),"Title",If(SortDescending1,Ascending,Descending))

But this is not Delegable. This is on a SP List that is 4200 items so needs to be delegable.

 

Without having to use Power Automate to create a 'Full Name' column from first name and last name. How can I achieve a search of a full name to filter the gallery? AddColumns 'Full Name'?

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @simondpalmer 
    I haven't tested this but try the formula below and see if it works.  Basically, it is parsing the name in the textinput box 

     

    SortByColumns(
     Filter(
     [@'Contacts Database'],StartsWith(
     'First Name', First(
     Split(
     TextSearchBox1.Text," "
     )
     ).Result
     ) || 
     
     StartsWith(
     'Last Name', Last(
    									Split(
    										TextSearchBox1.Text," "
     )
    								 ).Result	
     ) ||
     StartsWith(
     Company,TextSearchBox1.Text
     )
     ),"Title",If(SortDescending1,Ascending,Descending)
    )

     

  • simondpalmer Profile Picture
    131 on at

    Thanks but it errors that it is an invalid data type of Record. Expecting Text instead for StartsWith 

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @simondpalmer 

    I tested it out and it worked great but take a look at the formula.  I may have a mistake in the one I posted.  Here is the one I tested myself.!1.png

  • simondpalmer Profile Picture
    131 on at

    Awesome thanks! Yeah I forgot the ".Result" but that works great now. Super handy for other Filtering as well

  • IPC_ahaas Profile Picture
    1,387 Moderator on at
    I am trying to do the same thing but I'm getting an error. I had to change "Result" to "Value

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard