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 :
The basic formula in Power Apps is this:
SortByColumns(Filter([@'Notes de frais']; StartsWith(Title; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))
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))
Thank you in advance for your help !
Solved! Go to Solution.
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
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
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.
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))
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:
Best Regards,
Charlie Choi
@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
My Sharepoint list if you want :0 :
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
It's work thanks !
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
177 | |
52 | |
41 | |
36 | |
27 |
User | Count |
---|---|
240 | |
81 | |
71 | |
69 | |
66 |