cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaelQ
Frequent Visitor

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

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
RandyHayes
Super User
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,657)