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 / Add a row in Excel inc...
Power Automate
Unanswered

Add a row in Excel increment item number

(0) ShareShare
ReportReport
Posted on by 8

Hello - I have a similar situation as https://powerusers.microsoft.com/t5/General-Flow-Discussion/Auto-Increment-ID-number-in-Form-Responses-Tab-Excel-sheet/m-p/233774 and https://powerusers.microsoft.com/t5/Creating-Apps/Numbering-rows-in-the-table/m-p/203589

 

I would like to number the rows as they are added using Flow. However, I'm not sure about how to structure the expression that would get this done. Here's what I have so far:

I would like the "Camper" column to be where the item number goes. It would be incremental: 1, 2, 3 based on where the flow last ended. So row 84-86 (which came in by the Flow) should be numbered 82-84 respectively:

Any suggestions on an expression that would work or a way of getting this item numbering done?

 

Thanks!

Neil

Categories:
I have the same question (0)
  • NeilP Profile Picture
    8 on at

    Capture.JPG@Marty3012 @Anonymous 

  • v-bacao-msft Profile Picture
    on at

    Hi @NeilP ,

     

    Could you share screenshots of Flow's current configuration?

    I am not sure where you got the data and inserted them into the Excel table.

     

    If you are inserting the submitted data from MS Forms into the Excel table, it seems that you have a solution in the Thread you provided.

    List of response notification Response Id will record the order of submissions.

     

    If you want to automatically add the item number when inserting data into an Excel table that already has records, we could use the variable to get the current max item number, and then add 1 to generate a new item number.

    For example, my field name is Item Number, please refer to the following method to get the max item number.

     

    Image reference:

    13.PNG

     

    Please take a try.

     

    Best Regards,

  • NeilP Profile Picture
    8 on at

    @v-bacao-msft 

    Thanks Barry - I think we're close! The data is coming in from an online form service called Cognito Forms. They don't have a way on their end to number the list, so doing it like you suggested within the Flow I think is the way to go. When I put it together and ran a test this was my result:

     
    InvalidTemplate. Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '1' and column '2494': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'
     
    This was for records/rows 86, and 87 which were the two rows added at the start of the flow and so didn't have numbers assigned to them yet. Rows 1-85 picked up the integer number already in the row no problem. The flow didn't continue to the last Compose step. I think we need to find a way to increment the number and assign it to these last two spots in the array? Really appreciate your help, this is my first time using Flow so I'm really a fish out of water.
     
    Neil
  • NeilP Profile Picture
    8 on at

    flow result.jpg

  • v-bacao-msft Profile Picture
    on at

    Hi @NeilP ,

     

    I think you can consider manually filling the remaining two item numbers in the Excel table.

     

    Regards,

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard