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 / FetchXML Filter not wo...
Power Pages
Unanswered

FetchXML Filter not working

(0) ShareShare
ReportReport
Posted on by 10

I have this XML code that I sued to create a Custom Filter on a List

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
 <entity name="cr7d0_newtable">
 <link-entity name="contact" from="contactid" to="cr7d0_contributor_1" alias="contributor1">
 <filter type="and">
 <condition attribute="contactid" operator="eq" value="{{ user.contactid }}" />
 </filter>
 </link-entity>
 </entity>
</fetch>


The main purpose of this is to filter the list based on the Contact Logged 
The list has up to 5 Columns called Contributor_1 to Contributor_5 these columns are type Lookup to the Contacts table

So when a user submit a record they can add contributors to the record and when it is done, the user can see the records created by them but also the records where they are listed as contributors. 
but when I apply this filter I got no records filtered just an error

IT_User_0-1701312493961.png

 

Categories:
I have the same question (0)
  • Fubar Profile Picture
    8,497 Super User 2026 Season 1 on at

    Firstly, you cannot put Liquid inside the fetchXML Filter (it will just render as text).

    Using the Filters I doubt you will be able to do what you are wanting.

     

    What you could do is create 2 views (e.g. My Contributions and All Contributions) add them to the List (and as already pointed out on another post group the criteria as an OR for the different fields you and set them to a Contact record - the system will replace that contact record with the logged in portal user).  The user will then be able to select either view.

  • IT_User Profile Picture
    10 on at

    but for the Contact record I don't get the same filter options as if were using Created By
    there is no Contributor_1 (Contact) Equals Current User

  • Fubar Profile Picture
    8,497 Super User 2026 Season 1 on at

    The Created By can only be a System User.  Your Portal Users are Contacts (not system users). 

    For the view criteria you can set it equal to any existing Contact record (or create a dummy one, in the old days there they used to install a default one named Portal User) the Portal backend will swap that contact in the criteria to the current portal user when it does the query of the data.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 42

#2
Valantis Profile Picture

Valantis 24

#3
omkarsupreme Profile Picture

omkarsupreme 23

Last 30 days Overall leaderboard