cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevingeorget
Level 8

Populating display names from person field to a multiline textfield

Hi PowerApp users,

I need to populate a multiline text field with person's display names.

The multiline text field is in list A.

The persons field (allowing multiple selection) is in another list B.

Any help appreciated.

Regards,

Kevin

5 REPLIES 5
KOM_4410
Level 8

Re: Populating display names from person field to a multiline textfield

If you have both lists on edit or new mode in PowerApps, on the default property of the field in ListA add ListBPersonField.Selected.DisplayName where ListBPersonField is the field on LIstB to select the person.

 

So now, if you select the person on the ListBPersonField, the text field on list A should auto-populate with the name value.

 

Not sure if that's what you needed but I hope it helps

Community Support Team
Community Support Team

Re: Populating display names from person field to a multiline textfield

Hi @kevingeorget,

Could you please share a bit more about your scenario?

Do you want to populate the Multiline text field with values from the Person field of all records of your List B?

Or populate the Multiline text field with values from the Person field of one specific record of your List B?

If you want to populate the Multiline text field with values from the Person field of all records of your List B, I have made a test on my side, please take a try with the following workaround:6.JPG

 

7.JPG

Set the OnVisible property of the Edit screen to following:

Clear(DisplayNameCollection);
ForAll(
ForAll('20190129_case13_ListB'.Applicant, Applicant.DisplayName).Value,
Collect(DisplayNameCollection, Value.DisplayName)
)

On your side, you should type:

Clear(DisplayNameCollection);
ForAll(
      ForAll('YourListB'.Applicant, YourPersonColumn.DisplayName).Value,
      Collect(DisplayNameCollection, Value.DisplayName)
)

Set the Mode property of the Text Input box within the Multiline text field Data card to following:

Multiline

Set the Default property of the Text Input box within the Multiline text field Data card to following:

Concat(DisplayNameCollection, DisplayName & Char(10))


If you populate the Multiline text field with values from the Person field of one specific record of your List B, I have made a test on my side, please take a try with the following formula:

Set the Mode property of the Text Input box within the Multiline text field Data card to following:

Multiline

Set the Default property of the Text Input box within the Multiline text field Data card to following:

Concat(
LookUp('20190129_case13_ListB', ID=1).Applicant,
DisplayName & Char(10)
)

On your side, you should type the following:

Concat(
LookUp('YourListB', ID = 1).YourPersonColumn, /* <-- Finf the specific record in your List B firstly, then get the corresponding Person column value */
DisplayName & Char(10)
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
kevingeorget
Level 8

Re: Populating display names from person field to a multiline textfield

@KOM_4410thanks for the reply. I was looking for something similar to what @v-xida-msft has suggested.

kevingeorget
Level 8

Re: Populating display names from person field to a multiline textfield

@v-xida-msftthanks for the reply. My List B contains only 1 record with a multivalued person field. This will be used by all the records within ListA.

The ForAll condition provided won't work as the field has multiple values i guess.

Highlighted
Community Support Team
Community Support Team

Re: Populating display names from person field to a multiline textfield

Hi @kevingeorget,

The Applicant column is also a Person type column in my SP list, which has enabled "Allow multiple selections" option alreadly. So in my SP list, the Applicant column stores multiple values as that in your SP list.

Based on the needs that you mentioned, I think the ForAll function could achieve your needs. Please take a try with above solution I provided, then check if the issue is solved.

In addition, if your List B only contains single one record, you could also consider take a try with the following workaround:

Set the Default property of the Text Input box within the Multiline text field Data card to following:

Concat(
       First('YourListB').YourPersonColumn, /* <-- YourPersonColumn represents the Person column name within your SP list  */
       DisplayName & Char(10)
)

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 323 members 6,282 guests
Please welcome our newest community members: