web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Updating an Excel row ...
Power Automate
Unanswered

Updating an Excel row to add key... without a key

(0) ShareShare
ReportReport
Posted on by

I am building a flow aggregating multiple excel files into one on a regular basis. I have an Apply to Each step going through each individual file to add to a master, but before I do so, I want to add a random value to a key field if there isn't one.

 

The problem is, to update a row, you need a key field. Is there a method where I can indicate it is the current row within the Apply to Each step I am referencing?

Categories:
I have the same question (0)
  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Updating an Excel row to add key... without a key

    Hi @Anonymous ,

     

    Since update a row action need a key field and a key value of the row, you couldn't update the row without a key value.

    Please take a try with two workarounds below:

    1.Update the key field with a value manually in the individual file.

    2.Add the rows to the master file derectly, if the key field has an empty value, add the random value.please refer to my screenshot below:

    1.png

    The expression for the Key column "Column4" as below:

    if(empty(items('Apply_to_each')?['Column4']),rand(1,10000),items('Apply_to_each')?['Column4'])

     

    Best regards,

    Alice       

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard