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 Pages / Fetch XML not retrivin...
Power Pages
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 29

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" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
Size :: {{query.results.entities.size}}

<br>
{% 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.

 

thanks!

 

 

 

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,453 Most Valuable Professional on at

    Hi @PoojaD

     

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

    OliverRodrigues_0-1598195360711.png

     

    OliverRodrigues_1-1598195374009.png

     

    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.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'm facing exact same issue. Were you able to resolve it?

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 Pages

#1
rezarizvii Profile Picture

rezarizvii 53

#2
DP_Prabh Profile Picture

DP_Prabh 40

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 28 Most Valuable Professional

Last 30 days Overall leaderboard