cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Unable to use Filter Query in List records CDS

Hi Guys,

 

I have created a flow that triggers on create of an opportunity and creates a new connection record in Dynamics. Before creating a connection, it Lists Opportunity records. Now, I only want to retreieve those opportunities where the Account Name of existing opportunities = Account Name of newly created opportunity AND Opportunity Partner (Lookup) of existing opportunities = Opportunity Partner of newly created opportunity. I am using Filter Query under Lists Records as below but this is throwing an error: A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.account' and 'Edm.Guid' for operator kind 'Equal'.

 

Please advise. @v-bacao-msft 

 
 

 

Untitled.png

 

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Unable to use Filter Query in List records CDS

Hello @Rav_Chadha 

Please, have a look at this great solution posted by @Jcook : https://powerusers.microsoft.com/t5/General-Power-Automate/Filter-Query-in-List-Records-not-working-...

 

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Highlighted
Memorable Member
Memorable Member

Re: Unable to use Filter Query in List records CDS

@Rav_Chadha 

Please use _parentaccountid_value eq instead of parentaccountid

 

I also suggest using the CRMRestBuilder solution for constructing your filter Queries

 

You can install solution from here

https://github.com/jlattimer/CRMRESTBuilder/releases

You can use it as below to construct your Query:

 
 

Mira_Ghaly_0-1596098913865.png

Mira_Ghaly_1-1596098937978.png

After constructing your filter click create Request

Mira_Ghaly_2-1596098998672.png

Mira_Ghaly_3-1596099022394.png

 

 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Unable to use Filter Query in List records CDS

@Mira_Ghaly  - Thanks using _parentaccountid_value  worked. I have specified AND condition between both of them but looks like the logic is not working. After this step I added a condition, if list of items from get items is equal to 0, then create a new connection if not do nothing but it isnt going to Yes part.

 
 
 

It says - ActionBranchingConditionNotSatisfied. The execution of template action 'Create_a_new_record_2' skipped: the branching condition for this action is not satisfied.

 

Capture.JPG

 

Highlighted
Memorable Member
Memorable Member

Re: Unable to use Filter Query in List records CDS

@Rav_Chadha 

To check if the list records returned records u should use in your left handside the below expression

length(outputs('List Records StepName')?['body/value'])
 

If this post helps you with your problem, please mark your as Accepted solution.

If you like my response, please give it a Thumbs Up.

MG (Naturally Curious)

 

If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,046)