Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Get the most recent value From a list and use it in Odata filter or filter array

(0) ShareShare
ReportReport
Posted on by 158

Hello all, I have run into an issue with one of my flows. My current filter query does not work when a customer returns to a previous Planner bucket in MS Planner like this,

1. Customer goes from Planner Bucket A to planner Bucket B to Planner Bucket C filter works, new record/new bucket is added to list B

2. Customer goes from Planner Bucket A to planner Bucket B to Planner Bucket C then back to Planner Bucket A, new record is not added, the filter finds the old bucket not the most recent bucket

 

What I need is a way to capture the most recent Bucket from list B and use that in a variable in my filter, tried but no luck, I get an invalid query error below is my flow and filter. If body Length = 0 (True) then create the new record

 

(TaskChkListUID eq '@{triggerOutputs()?['body/TaskChkListUID']}') and (BucketID eq '@{triggerOutputs()?['body/BucketID']}') and (field_14 eq '@{triggerOutputs()?['body/field_14']}') and (field_16 eq '@{triggerOutputs()?['body/field_16']}')

 

 

rixmcx59_0-1686239558914.png

I tried adding an additional get Items, filtering on UID then sorting DESC and Top Filter of 1 which returned the correct value (most recent Bucket) which I stored in a variable but I did this in a test flow and could not figure out how to insert this into my flow. Thanks for any help

  • rixmcx59 Profile Picture
    158 on at
    Re: Get the most recent value From a list and use it in Odata filter or filter array

    Hello all, I made some progress, I think. I am able to capture the most recent bucket ID, how do I extract the ID value ? with parse json? I will try that. the BucketID value is what I need for my filter query for the next get items

    rixmcx59_0-1686323675229.png

     

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