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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Odata Filter query for...
Power Automate
Answered

Odata Filter query for dynamics CE Related Records

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Let my first start by saying I am new to flow.....

 

I'm creating a flow to return activity records and want to filter on a related record but not sure the correct syntax to use in the Filter Query. I want to return all activities where the regarding field is a lead, and the lead status = disqualified. 

 

Any initial direction/assistance would be greatly appreciated!

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    You can use the ODATA Filter queries for this one. Note that "=" is actually written as "eq" in the query. Also, kindly confirm what datatype if the field status? You will not be able to use the option names if it is an optionset, you will have to use the values here. 

     

    If the status value for disqualified is 1, the query will be Status eq '1'

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Do you want to return all activities where the regarding field is a lead and the lead status is “Disqualified”?

     

    Please check if the following flow will work for you.

     

    After the button trigger, add action List records to get records from Leads entity, and use Filter query to filter out records that status is Disqualified:

    Statuscode eq 4

    Add List records 2 to get records from Activities, input the following code in Filter query field:

    _regardingobjectid_value eq Lead

    Hope this could be a reference for you.

    1.PNG

     

    Best regards,

    Mabel

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yamao-msft This worked. Thanks so much!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard