cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
El_Sparks
Level: Powered On

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

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

Community Support Team
Community Support Team

Re: ODATA Not Equal for Two Fields

Hi @El_Sparks,

 

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.
El_Sparks
Level: Powered On

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

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 158 members 4,166 guests
Please welcome our newest community members: