Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to get the output body/value from multiple lines

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I need your help how to get all values of a combi field for a sharepoint list.

 

Example below. I need to get the value of multiple lines. 

Result should be 'Value 1' and 'Value 2'

 

Thx Martin 

 

{
"statusCode": 200,
"headers": {
},
"body":
"Test1": [
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 237,
"Value": "Value1"
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 67,
"Value": "Value2"

  • AndreasN Profile Picture
    305 Super User 2024 Season 1 on at
    Re: How to get the output body/value from multiple lines

    @Scherodan 

    I am glad to hear 🙂
    You are welcome bud.

     

     

  • Scherodan Profile Picture
    on at
    Re: How to get the output body/value from multiple lines

    @AndreasN now I got it. Thx you so much! Much appreciate!

     

  • Verified answer
    AndreasN Profile Picture
    305 Super User 2024 Season 1 on at
    Re: How to get the output body/value from multiple lines

    Is your compose 6 action pointing at the specific column or the whole output of your "get item"? 

    The output of your compose 6 looks off, it should not return ID and all the other columns, but only the values of your "value" column from your "get item".

    As you can see mine does:

    AndreasN_0-1696941207198.pngAndreasN_1-1696941245426.png

     

  • Scherodan Profile Picture
    on at
    Re: How to get the output body/value from multiple lines

    @AndreasN 

     

    It looks like this. The problem seems to be that I have to "xxx.value" column in my list as the column is the result of a lookup column.

     

    Scherodan_0-1696939504063.png

     

  • AndreasN Profile Picture
    305 Super User 2024 Season 1 on at
    Re: How to get the output body/value from multiple lines

    Can you show me how you've set it up??

    This is how I've done mine:

    AndreasN_0-1696937483635.png

     

    The input for the compose action is my multi choice column called "test value".

  • Scherodan Profile Picture
    on at
    Re: How to get the output body/value from multiple lines

    @AndreasN 

     

    now I get both values double 😞

    Scherodan_0-1696936949565.png

     

  • AndreasN Profile Picture
    305 Super User 2024 Season 1 on at
    Re: How to get the output body/value from multiple lines

    @Scherodan 

     

    Okay, so you have to loop through both choices if it's a multi choice column. 
    A simple way to do this, is simply to compose your "value" column, with a compose action. This would apply a "for each" loop. Given you want the output to be both values, you can initialize a variable and append the composed value in your apply for each.

    Like so:

    AndreasN_0-1696935457756.png

     

    Your variable will then store the values for you.

  • Scherodan Profile Picture
    on at
    Re: How to get the output body/value from multiple lines

    @AndreasN Thx you. 

     

    I use Get item (only one specific) and within this output the json above is coming. So both value sit within one.

     

    Scherodan_0-1696934409246.png

     

     

  • AndreasN Profile Picture
    305 Super User 2024 Season 1 on at
    Re: How to get the output body/value from multiple lines

    @Scherodan 

    Okay, there's two different IDs in your JSON so are you extracting two different items, or is it one item with multiple values?

     

    Are you using "Get item" or "Get items"?

  • Scherodan Profile Picture
    on at
    Re: How to get the output body/value from multiple lines

    @AndreasN thx for your answer.  Not really know what I should capture from screen as I need a logic to build 🙂

     

    At least I have a get item action - and within the resutl you find the json above. From this in need the values to use this for a reference on another get item action.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492