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 the content of ...
Power Apps
Unanswered

Filter the content of a column, search bar

(1) 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

 

 

 

The basic formula in Power Apps is this: 

 

 

SortByColumns(Filter([@'Notes de frais']; StartsWith(Title; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))

 

 

 

s44_0-1641914929523.png

 

 

 

I tried to modify it like this but it shows me errors:

 

 

 

 

 

SortByColumns(Filter([@'Notes de frais']; StartsWith(Nom Prenom; TextSearchBox1.Text)); "Nom Prenom"; If(SortDescending1; Descending; Ascending))

 

 

 

 

 

 

s44_0-1641894868108.png

 

Thank you in advance for your help ! 

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

    instead of Nom Prenom try doing 'Nom Prenom'

     

    e.g.

     

    SortByColumns(Filter([@'Notes de frais']; StartsWith('Nom Prenom'; TextSearchBox1.Text)); "Nom Prenom"; If(SortDescending1; Descending; Ascending))

     

    let me know what happens when you make that change

     

  • Hii_iii Profile Picture
    691 on at

    It's does'nt work :c @AJ_Z 

    s44_0-1641910789824.png

     

  • v-yujincui-msft Profile Picture
    on at

    Hi @s44 ï¼Œ

     

    Do you want to filter records by Person column?

    It seems that you cannot use SortByColumns() in the "Person or Group" column of a SharePoint list.

    In addition, Is it necessary for you to use SortByColumns()?

     

    I have made a test for your reference.

     

    1.Here is my SharePoint list.

    vyujincuimsft_0-1641964434729.png

    2.Select the Gallery Control and apply the following formula on its property as:

    SortByColumns(Filter(AddColumns(recruitrequest,"applicantdisplayname",applicant.DisplayName),StartsWith(applicantdisplayname,TextSearchBox1.Text)),"applicantdisplayname",If(SortDescending1, Descending, Ascending))

    vyujincuimsft_1-1641964434735.png

    3.In addition, you can try to use Sort() function.

    Sort(Filter(recruitrequest,StartsWith(applicant.DisplayName,TextSearchBox1.Text)),"applicant",If(SortDescending1,Descending,Ascending))

    Result Screenshots:

    vyujincuimsft_2-1641964434737.png

     

    Best Regards,

    Charlie Choi

  • Hii_iii Profile Picture
    691 on at

    @v-yujincui-msft  Yes, I want to filter the records according to the "Person" type column.
    No it is not necessary to use SortByColumns ()

     

    Your formula doesn't work or me :c

    s44_0-1641985980129.png

    s44_1-1641986148072.png

     

     

    My Sharepoint list if you want :0 : s44_1-1641214922274.png

  • v-yujincui-msft Profile Picture
    on at

    Hi @s44 ,

     

    The problem seems to be in your reference to the data source, you could try adding single quotes to the data source in the formula.

     

    SortByColumns(
           Filter(
                AddColumns(
                   'Notes de frais',//You should reference your data source with a single quotes
                          "nomprenomdisplayname",
                          'Nom Prenom'.DisplayName
                ),
                StartsWith(nomprenomdisplayname,TextSearchBox3.Text)
            ),
            "nomprenomdisplayname",
            If(SortDescending1,Descending,Ascending)
    )

     

    Best Regards,

    Charlie Choi

  • Hii_iii Profile Picture
    691 on at

    @v-yujincui-msft   I have this error with this formula 😞

    s44_0-1642065130031.png

     

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @s44 ,

     

    Maybe you should use TextSearchBox1.Text.

     

    Best Regards,

    Charlie Choi

  • Hii_iii Profile Picture
    691 on at

    It's work 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

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard