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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Using Value from Previous SharePoint List Row

(0) ShareShare
ReportReport
Posted on by 1,252

Hello,

I have a fleet of vehicles where I need to track mileage and inspections.  I have created a SharePoint List for current information data entry; however, I need a previous mileage field to fill based on the Vehicle ID.  I then want to identify the miles driven betwenn those dates for each record.  Following is an example...

 

DateVehicleCurrentMileagePastMileageMileageDiff
8/15100100009800200
8/151011200011900100
8/161001020010000200
8/171001035010200150
8/161011225012000250

 

My original thought was to have (2) Lists.  One list is a list of vehicles (VehicleList).  The second is the inspection (VehicleInsp).  I was then going to create a Flow that identifies the PastMileage from the VehicleList and update a field in the VehicleInsp.  Subtract the PastMileage from the CurrentMileage and then update the PastMileage (in the VehicleList) with the CurrentMileage entered for the inspection.

 

Is that the best method to achieve my results or are there more efficient options?

I have the same question (0)
  • ScottShearer Profile Picture
    25,254 Most Valuable Professional on at
    Re: Using Value from Previous SharePoint List Row

    @RJF61 

    Use a Get changes for an item or file action and check to see if the CurrentMileage has changed.  If so, I suggest getting the current mileage value from the last version of the list item and updating the PastMileage column.  Here is a blog post that explains how.

    You can use a SharePoint calculated column for the mileage difference or you can do the math in your Flow.

    Let me know if you need additional help.

     

  • RJF61 Profile Picture
    1,252 on at
    Re: Using Value from Previous SharePoint List Row

    @ScottShearer 

    Thanks for the response...still learning Power Automate and SharePoint!

    RJF61_1-1660835416214.png

    I have worked to create a Flow based on the Blog/link you provided.  Based on the sample data above I'm still not clear on the process.

    RJF61_2-1660835634411.png

    My questions...

    1.  The "Blog Flow" appears to work only when a record is modified.  In my case, New records will be the typical process.  Do I need Flows Steps in the "Yes" branch for new records?

    2.  I did some review of the Get Changes action.  Typically I found that it was associated with a different Trigger (When an item or file is modified).  Where would that action/process fit in the "Blog Flow"?

     

    Thanks,

    Randy

     

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard