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 / Incremental Serial Number
Power Automate
Unanswered

Incremental Serial Number

(0) ShareShare
ReportReport
Posted on by 17

I have an excel online table in which each row are uniquely identified by a serial number. A portion of the table is displayed below:

Power Automate Doubt.PNG

Using power automate, I want to fetch the highest Serial Number (in this case, 21), add 1 to it (then 22), and then use the new serial number to be added in a new row of the same excel table.

 

So the next time I run the flow, the highest will be 22, then add 1 to it, and then the new Sl no will be 23, and so on.

 

I'm fairly new to power automate, I tried to get the answer from existing questions, but somehow it wasn't working for me. Could someone pls help me out with the same example given above? Your help will be much appreciated.

 

If you need any extra information, please let me know.

 

@Mister_Shaik |  @ScottShearer |  @jinivthakkar |  @Expiscornovus |  @ekarim2020 

Categories:
I have the same question (0)
  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    Hi @PrasoonSur 

    You could do something like the following:

    serial-number.png

    1) List the rows present in the Excel Table, ordered by SerialNumber column in descending order.

    2) Get the first item of the previous action, and read the SerialNumber column value (21 in your sample), using the following expression:

    first(outputs('List_rows_present_in_a_table')?['body/value'])?['SerialNumber']

    Following, you should add 1 to the result and use it to create a new row in excel.

    Hope it helps!

    Ferran

  • PrasoonSur Profile Picture
    17 on at

    Hi @fchopo ,

    Thanks for the help!!

    I tried out the solution, which works like a charm in some cases but sometimes not (if entries are done fast) 

     

    I have added the same expression you provided, then converted it to an integer and then composed an add function to add 1 to the current highest number.

     

    Power Automate Doubt 2.PNG

    Compose : 

    first(outputs('List_rows_present_in_a_table')?['body/value'])?['Sl_no']
     
    Compose 2: 
    int(outputs('Compose'))
     
    Compose 3: 
    add(1,outputs('Compose_2'))

     

     

    It worked the first time, and it is working when I give some time in between to add next entry. But if I add the lines fast, it gives the previous solution;  so I assume I need to refresh the workbook before doing the above calculations. Is there any way to do that?

     

    Anyways you had provided the solution to my initial question, so I have accepted it as a solution. Much appreciated!

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard