cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nicole-dynamics
Level: Powered On

Odata Filter query for dynamics CE Related Records

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Odata Filter query for dynamics CE Related Records

Hi @nicole-dynamics ,

 

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Odata Filter query for dynamics CE Related Records

Hi @nicole-dynamics 

 

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!

Community Support Team
Community Support Team

Re: Odata Filter query for dynamics CE Related Records

Hi @nicole-dynamics ,

 

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

nicole-dynamics
Level: Powered On

Re: Odata Filter query for dynamics CE Related Records

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

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,478)