web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert single record ...
Power Automate
Answered

Convert single record choice column to text

(0) ShareShare
ReportReport
Posted on by 725

Hi everyone

I do have a working flow, which is grabbing a record from a Sharepoint list and emailing it as a Pdf, however one of the columns in my Sharepoint list is a multiselect choice column. I would like the values for the chosen record as text in my Pdf.

Any help would be appreciated

Categories:
I have the same question (0)
  • Kabilesh Profile Picture
    177 on at

    Hi @Corissandageri 

     

    Can you share the PDF Sample?

     

    Best Regards,

    VK

  • R Bakker Profile Picture
    725 on at

    This is the html before it is converted.

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    table, th, td {
     border: 1px solid black;
     border-collapse: collapse;
    }
    </style>
    </head>
    <body>
    <p>OPC Packaging Arrival Report for Order number </p>
    
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
    	<tbody>
    		<tr>
    			<td><strong>Company</strong></td>
    			<td><strong>Date</strong></td>
    		</tr>
    		<tr>
    			<td>&lt;Company&gt;</td>
    			<td>@{formatDateTime(utcNow(),'dd-mm-yyy')}</td>
    		</tr>
    		<tr>
    			<td><strong>Product</strong></td>
    			<td><strong>Qty</strong></td>
    		</tr>
    		<tr>
    			<td>@{outputs('Get_item')?['body/PType']}</td>
    			<td>@{outputs('Get_item')?['body/PQty']}</td>
    		</tr>
    		<tr>
    			<td>&nbsp;</td>
    			<td>&nbsp;</td>
    		</tr>
    		<tr>
    			<td><strong>Wrapped Acceptably</strong></td>
    			<td>@{items('Apply_to_each')?['Value']}</td>
    		</tr>
    		<tr>
    			<td><strong>UnDamaged</strong></td>
    			<td>&lt;UnDamagedYes/No&gt;</td>
    		</tr>
    		<tr>
    			<td><strong>Free of Vermin</strong></td>
    			<td>&lt;Free of VerminYes/No&gt;</td>
    		</tr>
    		<tr>
    			<td><strong>Stacked correctly</strong></td>
    			<td>&lt;Stacked correctlyYes/No&gt;</td>
    		</tr>
    	</tbody>
    </table>
    
    <p>&nbsp;</p>
    
    <p>Notes:</p>
    
    <p>@{outputs('Get_item')?['body/PNotes']}</p>
    
    <p>Packaging assessed by:</p>
    
    <p>@{outputs('Get_item')?['body/AssessedBy']}</p>
    
    <p>Signature:</p>
    
    <p>&lt;Signature&gt;</p>
    
    <p>Photos:</p>
     </body>
     <html>@{items('Apply_to_each')?['Value']}

     Some fields are not yet populated

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Here's a quick example where I get the values from my multi-select choice column then join them together.

     

    The SharePoint item I'm retrieving is ID = 4 in the following list. I'll retrieve all the Country values.

    grantjenkins_1-1671954864046.png

     

    See full flow below. I'll go into each action.

    grantjenkins_0-1671954784965.png

     

    Get item retrieves the item from the list.

    grantjenkins_2-1671954901026.png

     

    Select takes in the Countries from Get item, and uses the following expression to extract the values. Note that I'm also using Text mode (see arrow on screenshot below).

    item()?['Value']

    grantjenkins_3-1671954979381.png

     

    Join takes the output from Select and joins each of the items using ", ".

    grantjenkins_4-1671955034456.png

     

    This would give the following output.

    grantjenkins_5-1671955088155.png

     

    If you didn't want to use a Join action (as above) and just use an expression to join them, you could do the following.

    join(body('Select'), ', ')

     

    Once you have the values joined, you can add them to your PDF.

  • R Bakker Profile Picture
    725 on at

    Hi Grant

    Thank you for your time

    I can't seem to get past Select, in the Map field, it does not seem to matter whether I choose InwardPCondition Value or InwardPCondition Item or InwardPCondition. It is still asking for valid json. 

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You should just be using InwardPCondition (not Item or Value).

     

    When you run your flow can you look to see what JSON comes back for that field? For my Countries field (multiselect Choice field) I get the following:

    grantjenkins_0-1672019519427.png

     

    [
     {
     "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     "Id": 0,
     "Value": "USA"
     },
     {
     "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     "Id": 1,
     "Value": "Canada"
     },
     {
     "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     "Id": 2,
     "Value": "China"
     },
     {
     "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     "Id": 4,
     "Value": "England"
     }
    ]

     

    Is this similar to your field?

  • R Bakker Profile Picture
    725 on at

    Hi Grant,

    Thank you very much, it is working now.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 541

#2
Valantis Profile Picture

Valantis 479

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard