cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kyleb350
Level: Powered On

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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

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

Hi @kyleb350 ,

 

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.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

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

Hi @kyleb350 ,

 

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.

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,098)