Skip to main content

Notifications

Power Automate - Building Flows
Answered

Problems getting multi choice column values in

Posted on by 48

Hi everyone,

 

We're working in getting list items transformed to a PDF. Everything is working fine, except for one field. That is a multi-choice field (called 'Betrokken radionetten bij nieuwswijziging'). In this case, we're getting for every value this output: [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":4,"Value":"Valuename"}, after that we're also getting the values we want to see, but we're also getting the above code. And we want to get rid of that code :).

 

Our flow is:

1. Get item

2. Initialize variable (using string and the multi choice column itself)

3. Apply to each (select the output and then choose the value of the multi choice column)

4. Compose HTML (use the variable initiated above)

5. Create file

6. Convert file using Path

 

All columns work fine, except the multi choice column. Any idea on what we're doing wrong? Much appreciated!

 

 

 

 

  • AB-18111337-0 Profile Picture
    AB-18111337-0 48 on at
    Re: Problems getting multi choice column values in

    This works perfectly! Thanks!

  • Verified answer
    grantjenkins Profile Picture
    grantjenkins 11,057 on at
    Re: Problems getting multi choice column values in

    Below should get what you're looking for.

     

    I've got a list item with 3 x countries (multi-select Choice column).

    grantjenkins_0-1674824079136.png

     

    See flow below. I'll go into each of the actions.

    grantjenkins_1-1674824100212.png

     

    Get item retrieves the item from the list.

    grantjenkins_2-1674824130179.png

     

    Select uses Countries as the input and maps the Countries Value. Note that Map is using Text mode (see screenshot).

    grantjenkins_3-1674824279600.png

     

    Join uses the output from Select and joins each value with <br> which would make them go onto a new line in your HTML table. If you just wanted to display them separated with a comma, then you could just put a comma instead of <br>. You can then use the output of the Join when building up your HTML table.

    grantjenkins_4-1674824368515.png

     

    If we ran the flow, the output of our Join would be:

    grantjenkins_5-1674824456941.png

     

    If you didn't want to use a Join action, you can just use a join expression which will give you the same result.

     

    //Join the countries separated with <br>
    join(body('Select'), '<br>')
    
    //Join the countries serated with ', '
    join(body('Select'), ', ')

     


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard