Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Extract values from list

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have the following from a multi select question on a form:

 

["Item 1 - £15.75","Item 4 - £16.94","Item 5 - £6.39","Item 7 - £12.00"]

 

I want to extract the £ values and then have the ability to add them up in a subsequent step.

 

Can any one assist?

 

Jon 

  • Community Power Platform Member Profile Picture
    on at
    Re: Extract values from list

    Thanks Jay, all sorted now !

     

    Cheers for your help.

  • Community Power Platform Member Profile Picture
    on at
    Re: Extract values from list

    Hi,

     

    Thanks for your help so far, I have made the change to the compose action:

     

    add(float(body('Get_response_details')?['rdcceec6ad947470a85506d8dca8ef8ed']),float(outputs('Compose_check')))
     
    But still getting an error:
    error.JPG
     
  • Verified answer
    Jay-Encodian Profile Picture
    2,920 on at
    Re: Extract values from list

    @Anonymous 

    Having said that... it looks like your adding the output of the compose action with the value from the body (get response details).... this isn't correct.

    You need to add the output of the compose action to the value of the 'Total' float variable... that way each time the for each processes an item in the array the 'Total' variable is incremented.

    HTH

    Jay

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: Extract values from list

    Hey @Anonymous 

    You need to wrap the first parameter in the add() expression with the float() expression (as per the second parameter) as it is not in the correct format:

    2.png

    HTH

    Jay

  • Community Power Platform Member Profile Picture
    on at
    Re: Extract values from list

    Full result below

     

    1.JPG

     

    2.JPG

    3.JPG

  • Community Power Platform Member Profile Picture
    on at
    Re: Extract values from list

    Hi Jay,

     

    I am still having issues with this, please see my setup and then the error:

     

    setup.JPGcompose error.JPG

  • Jay-Encodian Profile Picture
    2,920 on at
    Re: Extract values from list

    Hey @Anonymous 

    Here you go:

    A.png

    Expressions for ease of copying:

    Compose: split(replace(replace(replace(variables('Value'),'[',''),']',''),'"',''),',')

    Compose - Split: split(items('Apply_to_each'),'£')

    Compose - Add the Values: add(variables('Total'),float(outputs('Compose_-_Split')[1]))

    Output:

    A.png

    HTH

    Jay

    -------------------------------------------------------------------------

    If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

  • abm abm Profile Picture
    32,492 Most Valuable Professional on at
    Re: Extract values from list

    Hi @Anonymous 

     

    You could do this in different ways. 

     

    Read each values from the array. Next for each value use a split function to split the values between '-'. Finally again use a replace function to remove the pound sign. Then add this to a variable and increment every time.

     

    If you want more help let me know. I could send some sample flow steps for you.

     

    Thanks

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1