Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Filter the content of a column, search bar

(0) ShareShare
ReportReport
Posted on by 691

Hello,
I have a Sharepoint list called "Note de Frais" and on my Power Apps application I would like to filter from the "Nom Prenom" column (which is a person field). I want to do this because I would like to create a search bar which will filter the "Nom Prenom" of the users.

 

My SharePoint list :

s44_1-1641214922274.png

 

 

I try this formula : 

SortByColumns(Filter(AddColumns('Notes de frais';"nomprenomdisplayname";'Nom Prenom'.DisplayName);StartsWith(nomprenomdisplayname;TextSearchBox1.Text)); "nomprenomdisplayname"; If(SortDescending1;Descending;Ascending))

But this formula creates errors. When filtering the "Nom Prenom", it works as can be seen in the screenshot below: 

11.PNG

 

But when I click on an expense report I have this problem.
When I was not using the formula to filter, when I clicked on an expense report it displayed the content of the expense report. Why is it that with the formula for filtering "Nom Prenom", my expense reports are not displayed correctly?

thank you in advance for your help !

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Filter the content of a column, search bar

    @s44 

    What is the error you are stating that you get with the formula?

     

    As for what you are referring to as expense reports, I am assuming that you are showing them in a Form.  If so, then you have changed the record schema in your Gallery by adding a column.  This will not match the datasource record schema any longer.  You will need to drop that column after you are done with it.

    So your formula would become:

    DropColumns(
     SortByColumns(
     Filter(
     AddColumns('Notes de frais';
     "nomprenomdisplayname";'Nom Prenom'.DisplayName
     );
     StartsWith(nomprenomdisplayname; TextSearchBox1.Text)
     ); 
     "nomprenomdisplayname"; 
     If(SortDescending1;Descending;Ascending)
     );
     "nomprenomdisplayname"
    )

     

    I hope this is helpful for you.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard