cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saraha
New Member

How to create Person Field from Text Field with Person's name

Hi there,

 

I have created a dropdown column where is pulls information from another SP List (Project Name). This also pulls through the Project Owner column from the other SP List. The only problem is that the Project Owner is a just a text field with the person's name (e.g. Sarah Smith) but I would like it to be linked to that person's contact card or email - i.e. be a Person field. 

 

Is there a way to create a Person column that will populate itself with the relevant person based on the entry into the Text Column? Then I will hide the text column of that person's name...

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @saraha ,

 

I did a test for you.After pressing the button, the person in the text column will be filled into the person column.

 

1\ This is my list 'LIST113'.

v-xiaochen-msft_0-1618882590670.png

 

2\ Add a button control and set its Onselect property to:

ForAll(Ungroup(AddColumns(LIST113.TextColumn,"Email",Office365Users.SearchUserV2({searchTerm:ThisRecord.TextColumn,top:1}).value.Mail),"Email") As A,Patch(LIST113,LookUp(LIST113,TextColumn=A.TextColumn),{PersonColumn:{Claims:"i:0#.f|membership|"&A.Mail,Email:A.Mail,Department:"",DisplayName:"",JobTitle:"",Picture:""}}))

 

3\ The result is as follows:

v-xiaochen-msft_1-1618883221906.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @saraha ,

 

I did a test for you.After pressing the button, the person in the text column will be filled into the person column.

 

1\ This is my list 'LIST113'.

v-xiaochen-msft_0-1618882590670.png

 

2\ Add a button control and set its Onselect property to:

ForAll(Ungroup(AddColumns(LIST113.TextColumn,"Email",Office365Users.SearchUserV2({searchTerm:ThisRecord.TextColumn,top:1}).value.Mail),"Email") As A,Patch(LIST113,LookUp(LIST113,TextColumn=A.TextColumn),{PersonColumn:{Claims:"i:0#.f|membership|"&A.Mail,Email:A.Mail,Department:"",DisplayName:"",JobTitle:"",Picture:""}}))

 

3\ The result is as follows:

v-xiaochen-msft_1-1618883221906.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,795)