
Announcements
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 :
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:
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 !
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.