Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Answered

Update row in Excel using dynamic content is not adding fields into row

(0) ShareShare
ReportReport
Posted on by 62

Hi 

I am running a flow where I am extracting data and adding rows into an excel table.  I am then taking a key field from my extract and using this field into a PowerBI query to return two other variables which I want to then update the row in excel that I have just added.

the query returns the correct data and I map it to a variable using the select statement - but when I go to update the row in excel it does not update - it 

 

perksyaus_0-1689826530982.png

perksyaus_1-1689831359006.png

I'm not sure what I am doing worng.

 

Denise

  • perksyaus Profile Picture
    62 on at
    Re: Update row in Excel using dynamic content is not adding fields into row

    When I first put your code in it did not like it - but today it does - thanks so much this is perfect

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Update row in Excel using dynamic content is not adding fields into row

    Hi Denise,

     

    You need to write an expression to get the value of 'ProfitCentre' property from the output array of Select action.

     

    Here are the detailed steps to extract the value from Select action output:

    ManishSolanki_0-1689914807352.png

    1. Click & select the column to update in the excel, here I have chosen Serial# column to update.

    2. Next, we will select 'Expression' option and type the below expression in the expression textbox. First() formula will get the first item of an array and then we will pull out 'ProfitCenter' value using indexer:

    first(body('Select'))?['ProfitCenter']

    3. Click, save & test your flow

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • perksyaus Profile Picture
    62 on at
    Re: Update row in Excel using dynamic content is not adding fields into row

    Thanks for the reply:  the output from the select returns as an array:

     

    [
      {
        "Material": "1557LV",
        "ProfitCentre": "1TR007LV00"
      }
    ]
     
    I just require the value to be updated in the Excel row - but I can't get the syntax right to access the value in the array - any help would be grateful
    Denise
  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Update row in Excel using dynamic content is not adding fields into row

    You are using the Variable in multiple steps, but that doesn't change the variable. You could use the Variable in 10 different steps and it will remain the same, that is the purpose of using a variable. 

    You set a Variable to be a value, and then when you use the Variable throughout the flow, it will remain that same value.


    The only way to change a Variable is to use another Set Variable action or Append to Variable action. 

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Update row in Excel using dynamic content is not adding fields into row

    Hi @perksyaus 

     

    You can get the value of 'Profit Center' without using variable. For that, you don't need to write the variable name in Map key inside select action, just type the plain text 'ProfitCenter' as shown beloe:

    ManishSolanki_0-1689837428397.png

     

    Once it is done, then you can write the below expression in the Update row action to save that value in excel sheet:

    first(body('Select'))?['ProfitCenter']

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    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