We can now do column comparison with Fetch/Web API!

By | July 15, 2020

Wow, we’ve been asking about it for a (long) while:

image

https://powerapps.microsoft.com/en-us/blog/announcing-column-comparison-through-fetchxml-sdk-and-odata/

Do you want to do column comparison with Fetch? You can do it now – it’s only supported for a few conditions so far:

  • Equal
  • NotEqual
  • GreaterThan
  • GreaterEqual
  • LessThan
  • LessEqual

 

And it’s not, yet, supported in the UI query building tools (Advanced Find). And it can only be done within the entity, but… with all those limitations, which will hopefully go away over time, I can still do this, for example:

Find all accounts where primary contact’s email address is identical to the the account’s email address

Did not I just say it only works within the same entity? Yeah, but… It’s problem solving 101 – lets reduce this more complicated problem to the problems we can solve.

1. No multiple entities allowed? Let’s create a calculated field and populate it from the primary contact

image

2. Can’t use the UI to build that query yet? XrmToolBox to the rescue

image

And here we go:

image

And if you wanted to utilize this in the system views, you might just use View Designer tool in XrmToolBox to update a system view:

https://www.xrmtoolbox.com/plugins/Cinteros.XrmToolBox.ViewDesigner/

One thought on “We can now do column comparison with Fetch/Web API!

  1. Jonas Rapp

    Just out of curiosity – why would you do this in FetchXml Tester and then View Designer, instead of letting FetchXML Builder do it all for you…? 😉

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *