Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Fetch XML not retriving records with Filters in web page Liquid code

Hello ,


I am facing issue with fetch xml query . there is one custom entity that I want to retrieve using fetch XML . I have given specific Entity permissions for that entity to logged in user.

When I am adding fetch XML on web page, its retrieving all the records and not considering applied filters. I have copied fetch XML from advanced find and it is showing expected records there.

below is the query that I have used

{% fetchxml query %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="contact">
<attribute name="fullname" />
<attribute name="telephone1" />
<attribute name="contactid" />
<order attribute="fullname" descending="false" />
<filter type="and">
<condition attribute="fullname" operator="eq" value="test" />
{% endfetchxml %}
Size :: {{query.results.entities.size}}

{% for record in query.results.entities %}
FullName :: {{record.fullname}}
<br />
{% endfor %}


strangely when I placed <filters> tag before <attributes> tag it started working but issue still occurs as it doesn't work with multiple filter conditions and only first attribute will be available in results.  generally XML should not rely on sequence of tags and I never faced this kind of issue in previous versions. Anyone has faced this issue? Please help.






Super User II
Super User II

Hi @PoojaD


I just tested your code here and seems fine, nothing wrong with it:





I don't have a phone number associated to my contact.. but when removing the filter, it showed up all contacts' numbers, so it is working as expected

would you have maybe multiple entity permissions o the Contact entity that might be mixing things up by any chance?



If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.



If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User

Oliver Rodrigues


Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (38,065)