Hi,
I have an App where members of my team can create a profile, I have several column in my SP List. I have a PersonalID column which is the users Office365 Profile mailnickname and a column (person) called Display Name.
When the users create their profile the Personal Id is automatically written to the list. The problem is, I have only recently added the Display Name column, which is my person columm, so i am trying to get my App to automatically populate this using the Personal Id.
I have a gallery in my App which contains all the profiles in the list, and have added a comobox and put the defaultselcteditems code as
Office365Users.SearchUser({searchTerm: Trim(ThisItem.Personal ID)})
So this does as intended, it puts the Display Name of the person associated with that Personal Id into my combobox.
I then have the following code on a button
ForAll(
Gallery1_2.AllItems,
Patch(
'MY SHAREPOINT LIST',
LookUp('MY SHAREPOINT LIST', Personal Id = Gallery1_2.Selected.Personal Id),
{ Display Name column: ComboBox1.Selected }
)
)
However this doesnt work, it doesnt patch anything to the person column.
However if I change the code on the defaultselecteditems to
ThisItem.Display Name person column
It works as intended, and patches the display name in the combobox to my list. But This would mean changing all the name manually, there are too many so i need it to lookup the Personal Id column and auto populate the display name to the combobox.
Or if anyone else has a better way to do this, any help greatly appretiated.
Thanks