Introduction of column comparison in FetchXML came as relief for so many consultants like me who have been working on Dynamics 365 platform for over a decade now. It was rather hard to understand why a feature which is quite basic and in demand took more than a decade to be finally inducted in the platform.
Nonetheless it is here now for close to a year. If you are not aware of it, you can read more about it here.
If you are this far, it’s quite obvious you know the functionality. But does that work with Power Apps portals. The most obvious answer that come to my mind is – Yes offcourse it should work.
After all, portal is on DataVerse and if a view is working on DataVerse, it should work on portals as well.
Well not exactly. Let’s take an example here.
Below is fetchxml query for account where I am using column comparison.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="contact">
<attribute name="fullname" />
<order attribute="fullname" descending="false" />
<filter type="and">
<condition attribute="firstname" operator="eq" valueof="lastname" />
</filter>
<attribute name="contactid" />
</entity>
</fetch>
Very simple query. Observe the section highlighted in bold. I am using column comparison using the valueof keyword.
This works perfectly fine in Model driven apps/ Dynamics 365 product. But when you try to use the same view in Power Apps portal, below is the error you will see when your entity list is rendering.
Not a very detailed error. But once you enabled diagnostic logging, you would observe the following error in logs.
“Attribute ‘value’ or ‘valueof’ must be specified for condition operator: Equal“
I am pretty sure this is going to be fixed soon. Till then if you are planning to use views column comparison in Portals, you need to wait just that little bit more longer.
Hope this helped!
Debajit Dutta
Business Solutions MVP
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.