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 Automate
Unanswered

Get Items

(1) ShareShare
ReportReport
Posted on by 113

I have a flow 'When an item is created' with various steps including updating the item just created and oteh calculations, at one point within the flow I have a 'Get items' where I am looking to retrieve a specific value in a column from the second last record retrieved via teh fileter query which would include the one currently created e.g.

Capture.JPG

Any thoughts on how I can achive this withi the Get Items?

Thanks

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @E9Mate ,

     

    Have you considered using Get Items first with a Top Count = 1 and retrieve the desired record first?  Then, add your new item, etc.  This is the easy way.

     

     

  • E9Mate Profile Picture
    113 on at

    Hi @trice602 , 

    I don't think that would be the best approach or how to achieve it that way.

    The interface is set up for the user to enter the information on a SharePoint list, based on what information is entered and saved.

     

    Basically various user work on a specific record that is entered on SharePoint list (ID85 in the example) when all users have finished the record will be closed with one specific column containing an outcome WOK = Level 1.

    When a new item is created (which could be month later) the 'Get items' is triggered on the back of 'When an item is created' and would filter all entries based on the filter query rule which would include also the latest entry ID90.

    I then need to update the latest entry (ID90 of the When an item is created) with the information contained in the outcome of the record entered months behind. 

    In the example below ID90 is the latest record created and retreived from the 'Get items', the next step in the flow would be update ID90 with the information contained in ID85, and update it with the value contained in WOK which is Level 1

    Basically this would be the second last item retrieved.

    Capture.JPG

    Hope this makes more sense to what I am trying to achieve.

    Thanks

     

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    Set Get Items to sort by ID in descending order, only get two items, and in the next connector pick up the last one.

  • E9Mate Profile Picture
    113 on at

    Hi @Chriddle.

    Thanks for the hint, I have a compose action and used the 

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

     

    Screenshot 2023-11-02 091543.png

     

    I need now to update the item, but I am stuck on how to retrieve the value in the column from the Compose action.

    I can see the correct information I need to get the value 'Level 1' and update the item with this

    Screenshot 2023-11-02 091740.png

    Thanks,

  • Verified answer
    Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    Something like this:

    outputs('Compose')['LevelTriggered']['Value']
  • E9Mate Profile Picture
    113 on at

    @Chriddle Thanks for your help with this matter.

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