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 Not Equal for Tw...
Power Automate
Answered

ODATA Not Equal for Two Fields

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Categories:
I have the same question (0)
  • Verified answer
    SimonNie Profile Picture
    65 on at

    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

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    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 Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yet another hacky workaround. So basically you need to add a temporary field - would you add this to the dev environment then push it through to uat and then prod? Or would you just amend prod temporarily? 

    Power automate just seems to go against any good practice we've learned with traditional software development for years. I have the same problem.. I need to update some records where a field is not equal to another one. I tried using a filter array but as the table contains more than 20,000 records I can't run the previous action to list the records - get an out of memory error. Yes you heard that right, 20,000 records!!! In pretty much every previous job I've had we are dealing with hundreds of thousands and millions of records of data and SQL will do updates in seconds. Power platform can't even deal with 20,000 records! Mental. 

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard