Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Pull value from previous delivery SharePoint list.

(0) ShareShare
ReportReport
Posted on by 152

Hello,

 

I'm working on a SharePoint list for incoming goods. When we register a new delivery we have to compare the value for a characteristic with the value of the previous delivery. For example in below image, for the delivery of product A on 2 December I need to pull the value of the 1 December delivery. Is that possible?

 

Rapaille_0-1670235743202.png

Kind regards,

Hans

 

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Pull value from previous delivery SharePoint list.

    See updated flow design where it triggers after you add an item to the list via Power Apps.

     

    I'm using the same list as the previous example.

    grantjenkins_2-1670417031631.png

     

    Full flow below. I'll go into each of the actions.

    grantjenkins_0-1670416957930.png

     

    When an item is created will fire when you add the item.

    grantjenkins_1-1670417003086.png

     

    Get items is similar to the previous example, except that we use the Title column from our trigger, and also ensure we don't return the item that was just created by checking the ID.

    grantjenkins_3-1670417126380.png

     

    Condition checks to see if there was a previous item with the same Product Name (length of Get items is equal to 1), and if so, update the item that was just added. The expression used is:

    length(outputs('Get_items')?['body/value'])

    grantjenkins_4-1670417198513.png

     

    Finally, Update item updates the current item with the value from the previous item. Note that ID and Title come from When an item is added. And the expression to get the Value Previous is:

    first(outputs('Get_items')?['body/value'])?['ValueNew']

    grantjenkins_5-1670417301550.png

     

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Pull value from previous delivery SharePoint list.

    Ah, ok - I'll redesign what I posted before to work with that. Hopefully get something to you within a few hours.

  • Rapaille Profile Picture
    152 on at
    Re: Pull value from previous delivery SharePoint list.

    Thank you @grantjenkins for your help. I tried above steps, but I receive a issue with the expression.

     

    When we create a new item in the Powerapp, the new item in the Sharepoint list will automatically be created. After that the flow should start, pull the latest value and add this to the Previous value column.

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Pull value from previous delivery SharePoint list.

    Hopefully this is what you're after.

     

    The SharePoint List I'm using for this example.

    grantjenkins_0-1670312168660.png

     

    See full flow below. I'll go into each of the actions.

    grantjenkins_1-1670312228018.png

     

    I don't have a Power Apps Form so just added Inputs into a Manual Trigger for this example.

    grantjenkins_2-1670312263346.png

     

    Get items will try to retrieve the last item added with the same Product name. For my SharePoint List, the Product column is actually my Title column (just renamed it) so need to use Title in my Filter Query. It then sorts the results by Date in descending order, so it retrieves the newest entries at the top, then just returns the first one (Top Count = 1).

    grantjenkins_3-1670312391358.png

     

    Create item will then take the input from the Trigger and use the following expression to retrieve the value from the previous Product entry (if one exists - could be the case where it's a new product). Also note that the internal name of my Value New column in the SharePoint List is ValueNew. The expression checks to see if the length of Get items is equal to one (an item with the same product name exists). If there is one, it gets the first item and retrieves the value from the ValueNew field. If no items returned, then it just sets the value as null.

    if(equals(length(outputs('Get_items')?['body/value']), 1), first(outputs('Get_items')?['body/value'])?['ValueNew'], null)

    grantjenkins_4-1670312513218.png

     

  • Rapaille Profile Picture
    152 on at
    Re: Pull value from previous delivery SharePoint list.

    @grantjenkins, we use a Powerapps app to add a row.

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Pull value from previous delivery SharePoint list.

    @Rapaille Makes more sense 🙂

     

    How are you going to be adding rows to your SharePoint List? Are you adding it manually and want a flow to then calculate the last value, or are you adding a row directly via Power Automate?

  • Rapaille Profile Picture
    152 on at
    Re: Pull value from previous delivery SharePoint list.

    @grantjenkins, thanks for your answer. The Excel table was only as example.

     

    I do indeed use a SharePoint list, so I'm looking for a way to pull a value from the item of same product.

     

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Pull value from previous delivery SharePoint list.

    How are you adding the data to your Excel Table? Just trying to understand how your flow will work, etc. since you mentioned you're using a SharePoint List.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1