Skip to main content

Notifications

Power Automate - Building Flows
Answered

Issue with getting latest rows in sharepoint excel

(0) ShareShare
ReportReport
Posted on by 4
I am building a flow, where I want to find max value of a specific column in excel (e. g. project number) and add new row with incremented value. I don't want to use formula in table, because this field doesn't follow strict autoincrement formula (each month some suffix is added, but the rule that max value is latest project number is valid).
 
What is working:
- I can get latest (highest) project number and increment it
- I can add new row with incremented project number and I can see it it the document I have opened for preview
- I can access the value that was stored in the new row and use it in further flow steps
 
So basically everything seems to be working, but I noticed that triggering the same flow again shortly after previous one was completed doesn't seem to find the newly added row (even though I can see it in online editor of this file, which is irrelevant of the powerautomate - from this I conclude that the file was saved).
 
I use "List rows present in a table" step with Top count "1" and Order by "Number desc" and it still returns previous highest number and causes the same number to be reused for another row. When I wait between executions it runs smoothly, but I want to make sure that people triggering automation asynchronously won't cause any issues. Is there any way to force reload before searching for the top row or what is the issue here?
  • Suggested answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,059 on at
    Issue with getting latest rows in sharepoint excel
    Hi, i remember this issue has been reported by some users in forum ( i could not share the exact link to the issue as i did not get it now) but the workaround was to use delay activity after adding a row or before querying the excel for the last row to ensure that data is correctly populated in excel.
     
    So one thing i would suggest is use a do until loop and inside that check whether new row has been added using list rows and check whether the data has been added to excel using filter query, if yes> exit out of loop. if no> keep wait for some time and retry again.
     
    This has to be done once data is added to excel table.
     
    Hope it helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     

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,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard