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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update multiple rows w...
Power Automate
Answered

Update multiple rows without unique column and value (and without Office Script)

(0) ShareShare
ReportReport
Posted on by

Hi, I want to update rows in excel based on certain conditions, but my table does not have unique column. I also cannot manually add unique column in the excel file because it will defeat the dynamic purpose. 

 

How can I create the unique column and value solely using Power Automate itself and update multiple rows? I don't have Office Script running in my current version of Excel.

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at

    Hi @Anonymous ,

     

    What I have done in the past is create a column to the far right of your table (it won't hurt any of your formulas if it is the last column) and then simply write a unique key value that is sequential (doesn't have to be though).  From there, you can even hide the column but still refer to the value. 

     

    To answer your question, you can use Power Automate Desktop to create your column and unique values but again, I've found it easier and more effective to simply add to the far right directly in Excel and hide the column.

     

    Let me know your thoughts - always glad to help!  Tom

     

    trice602_0-1688704386725.png

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @trice602 , thanks for your sharing!

     

    I am using Power Automate for cloud and I cannot manually add the Unique key value because I'm helping a team to ease their work, I just want them to upload their file in SharePoint and everything is done. 

     

    Is there anyway that I could run some script in power automate to add the unique ID?

  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at

    Hi @Anonymous ,

     

    Yes you can add a column in your cloud flow too and I think this will work for you!  Please mark as a solution so others can find it quickly too!  Always glad to help!  Tom

     

    trice602_0-1688738319366.png

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @trice602 , thanks for the help!

     

    I tried using that but it gives out column with empty value. Is there any way I can do to fill the column with key values? 

  • Verified answer
    trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at

    Hi @Anonymous ,

     

    Here you go!  Please give me a thumbs up and mark as a solution if this works for you - always glad to help! Tom

     

    So in this case, let's assume there isn't a column with unique values and to do this we need to create a temporary unique column values as we create our key.  Remember, step one is to simply add the key column in a separate flow that you already completed.

     

    Next in my sample data, you can see I don't have a column with distinct values.  I will create a random number as my keyvalue from 11111111 to 99999999.  As we create the keys, I am referencing my description column and making it unique as I go through each row by adding [xxxx] at the end.  This allows me to assign keyvalues to rows that have duplicate description values.

     

    My description concat is:  concat(items('Apply_to_each')?['Description'],' [',rand(1111,9999), ']')

     

    My keyvalue is: int(rand(11111111, 99999999))

     

    Not included here - if you absolutely needed to remove the temporary value in the description, you could loop back through each row and capture the length and only keep the length - 7; to remove _[xxxx] and I would do that in a separate clean up flow.

     

    This was a little bit of a challenge but works.

     

    key2.png

     

    key3.png

    key4.png

     

    key5.png

  • Community Power Platform Member Profile Picture
    on at

    Wow it really works, thank you so much for helping me out @trice602 !

  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at

    Always glad to help!  Be sure to tag me in your future posts so I can review and help!  Tom

  • Community Power Platform Member Profile Picture
    on at

    Hi again @trice602 

     

    It seems like sometimes it works but sometimes it doesn't. There are some records that didn't get updated (for both columns) and it usually happen at last few records. Please refer to the screenshot below.

     

    Screenshot 2023-07-10 114253.png

    I'm using a large data for the screenshot above but it also happens to small data file.

     

    My workflow is like this:

    Screenshot 2023-07-10 114611.png

     

    Screenshot 2023-07-10 114632.png

    Screenshot 2023-07-10 114655.png

    I added compose at last because sometimes it does completely work but it alwats gives error "ActionFailed. An action failed. No dependent actions succeeded."

     

    Perhaps you might help me on this issue? Thanks a lot!

  • Community Power Platform Member Profile Picture
    on at

    @trice602 since i'm doing everything dynamically, I did it like this:

    maryamcs_0-1688961416471.png

     

  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at

    Sorry to hear that, I will review this week.  Your flow is different than mine, you have an apply to each at the worksheet level and another one nested apply to each at the table level so I would need to know more about those worksheets and tables to understand.  Please send in message if you don't want to show your work in the post. 

     

    Always glad to help! Tom

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard