Skip to main content

Notifications

Power Automate - General Discussion
Answered

Increment ID column for multiple Rows

(0) ShareShare
ReportReport
Posted on by 9

Flow to develop :

1. Upload a excel to sharepoint ( col : id, name, status)

2. convert the excel into table

3. Read the rows from excel

4. Append all the rows of new excel in pre exisiting Master table. In doing this I want to update/increment the ID column based on previous data

 

Step 1,2 and 3 is done

AyushPriyadarsh_0-1704994779024.png

 

In step 4 , I am facing issue : if in my already exisiting data, the last row id is 4 and I am appending 2 more rows then both of my rows ID are showing 5 instead of 1st row to be 5 and 2nd row to be 6. I tried adding a delay also but it doesnt work

 

AyushPriyadarsh_1-1704995010669.png

 

Using output of compose in add a row into table

 

 

Help would be appreciated.

 

Thanks,

Ayush

 

 

 

 

  • Verified answer
    AyushPriyadarsh Profile Picture
    AyushPriyadarsh 9 on at
    Re: Increment ID column for multiple Rows

    Hi @v-yueyun-msft ,

    Thanks for the response, but I found the solution. 

     

    Instead of finding the last row of my Master table inside the loop, I did that outside the loop and assigned to a variable "maxID" and then used increment variable property inside the loop.

     

    AyushPriyadarsh_0-1705132927775.png

     

    This did the work for me 🙂

     

    Regards,

    Ayush Priyadarshi

  • Re: Increment ID column for multiple Rows

    Hi , @AyushPriyadarsh 

    If possible , can you try to close the Split on in the trigger's setting to test:

    vyueyunmsft_0-1705027665505.png

    And you need to use the Apply to each action to loop to add a row in your table.

     

    Best Regards,

    Yueyun Zhang

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard