cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

ODATA Not Equal for Two Fields

I'm trying to get a List Records from Dynamics 365 and I would like to filter the data by "Field1 ne Field2". When I run the Flow I get an error message: "The right side of the 'NotEqual' operator must be a constant value." Does anyone know of a workaround for this?

1 ACCEPTED SOLUTION

Accepted Solutions
SimonNie
Level: Powered On

Re: ODATA Not Equal for Two Fields

I am pretty sure, that you can not do that. In Dynamics it is also not possible to build such a query.

 

Workaround:

Create a third field3 in Dynamics and fill it with a business rule on entity level

If field2 greater than field1 then set field3 to yes.

 

Then you can use field3 in your List Record

 

Simon

View solution in original post

3 REPLIES 3
SimonNie
Level: Powered On

Re: ODATA Not Equal for Two Fields

I am pretty sure, that you can not do that. In Dynamics it is also not possible to build such a query.

 

Workaround:

Create a third field3 in Dynamics and fill it with a business rule on entity level

If field2 greater than field1 then set field3 to yes.

 

Then you can use field3 in your List Record

 

Simon

View solution in original post

Community Support Team
Community Support Team

Re: ODATA Not Equal for Two Fields

Hi @Anonymous,

 

I agree with @SimonNie that when configuring a Filter query in many similar actions, the arguments to the right of the operator must be constants to be a reasonable configuration.

In addition, the workaround he provided is also worth using.

Or you could use Filter array action to filter the eligible records.

For example, field 1 is not equal to field 2.

61.PNG

Thus, Filter array output is actually the result of the list records being filtered.

You could then use the result of the Filter array output to configure the following action.

Take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: ODATA Not Equal for Two Fields

My final solution was to use an "old school" workflow, which did allow me to check Field1 <> Field2 before moving to the update record step. However, @SimonNie did have a perfectly workable solution, so I'll mark that as Accepted.

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 (Last 30 Days)
Users online (5,250)