cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaelQ
Level: Powered On

People Picker to PDF

Hi,

 

I am converting a customized sharepoint form to PDF using powerapps-flow-onedrive-sharepoint. When writing the HTML text in powerapps, I have to mention the DataCard values. One of my DataCards is a people picker (multiple names). When I write the following; DataCardValue15.Selected.DisplayNames the PDF displays only 01 name , when there are actually 07 names selected in the field. The 01 name displayed is the 7th name that was selected on the form by the user.

 

Any ideas?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: People Picker to PDF

Hi @MichaelQ ,

Do you want to include the names of all Persons selected within your People picker control in your HTML text?

 

Based on the formula that you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

If you want to extract all person names from your People Picker control, please take a try with the following formula:

Concat(
             DataCardValue15.SelectedItems,
             DisplayName & "&"                   /* <-- using '&' as separator */
)

Or

Concat(
             DataCardValue15.SelectedItems,
             DisplayName & " "                    /* <-- using ' ' as separator */
)

On your side, you should modify your HTML text formula as below:

"<div><span style='font-size:14pt;font-familySmiley Very Happyubai;color:#2C2D65;mso-fareast-languageSmiley TongueL'>" & 
  Concat(
DataCardValue15.SelectedItems,
DisplayName & "&"
) & "</div>"

Please take a try with above solution, then check if the issue is solved.

 

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.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: People Picker to PDF

@MichaelQ 

Since this is a multi-select list, you'll want to concat the results of the list.  Try using this formula:

 

Concat(DataCardValue15.Selected, DisplayName & ", ")

This will give you a comma separated list of display names.  You can adjust as needed to any of the other fields beside DisplayName if necessary.

Also (as crazy as it may look) to remove the trailing comma, this formula would do the trick:

Left(Concat(DataCardValue15.Selected, DisplayName & ", "), Len(Concat(DataCardValue15.Selected, DisplayName & ", "))-2)

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
MichaelQ
Level: Powered On

Re: People Picker to PDF

Hi,

 

Thanks.....I tried both options, but neither seems to resolve the issue. The full string that successfully returns 01 name out of the 07 is as follows:

 

<div><span style='font-size:14pt;font-family:Dubai;color:#2C2D65;mso-fareast-language:PL'>" & DataCardValue15.Selected. DisplayName & " </div>

 

Please advise how your suggested options would fit in to this and return the correct result.

 

Thanks,

 

MichaelQ

Super User
Super User

Re: People Picker to PDF

@MichaelQ 

So your formula doesn't look like you included that concat in it?  

Here is what you will need then:

<div>
<span style='font-size:14pt;font-familyubai;color:#2C2D65;mso-fareast-languageL'>" &
Left(Concat(DataCardValue15.Selected, DisplayName & ", "), Len(Concat(DataCardValue15.Selected, DisplayName & ", "))-2) &
"</span></div>"
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: People Picker to PDF

Hi @MichaelQ ,

Do you want to include the names of all Persons selected within your People picker control in your HTML text?

 

Based on the formula that you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

If you want to extract all person names from your People Picker control, please take a try with the following formula:

Concat(
             DataCardValue15.SelectedItems,
             DisplayName & "&"                   /* <-- using '&' as separator */
)

Or

Concat(
             DataCardValue15.SelectedItems,
             DisplayName & " "                    /* <-- using ' ' as separator */
)

On your side, you should modify your HTML text formula as below:

"<div><span style='font-size:14pt;font-familySmiley Very Happyubai;color:#2C2D65;mso-fareast-languageSmiley TongueL'>" & 
  Concat(
DataCardValue15.SelectedItems,
DisplayName & "&"
) & "</div>"

Please take a try with above solution, then check if the issue is solved.

 

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,479)