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 / Update row in Excel us...
Power Automate
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

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    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

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    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. 

  • perksyaus Profile Picture
    62 on at

    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
  • Verified answer
    Manish Solanki Profile Picture
    15,167 Moderator on at

    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

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

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 630

#2
Valantis Profile Picture

Valantis 420

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard