I'm trying to filter a Power Pages (Power Apps Portal) entity list by the currently logged-in user. Hardcoded fetch XML works, but when I switch to a dynamic approach with Liquid, it fails to filter.
For example, the following hardcoded fetch works fine:
{% assign currentUserId = '{' | append: user.contactid | append: '}' %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="request_ticketlist">
<filter type="and">
<condition attribute="ticket_createdby" operator="eq" value="{{ currentUserId }}" />
</filter>
</entity>
</fetch>
{% endif %}
- Using {{ user.contactid }} directly without braces.
- Checking entity permissions for the contact and request_ticketlist tables.
- Verifying sign-in and verifying that “user” data is available in the same block.
How can I ensure that my fetch XML dynamically filters records based on the signed-in user’s contact ID? Any configuration steps I might be missing?