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 / Using FetchXML to Filt...
Power Pages
Suggested Answer

Using FetchXML to Filter Virtual Sharepoint Table

(0) ShareShare
ReportReport
Posted on by 20
Hi
 
I have a virtual table in dataverse linked to a sharepoint list. I need this set up due to the back end design for us in office - pointing this out as I know its easier to just have a dataverse table which I do for most of the tables in the power pages solution.
 
The issue I am having is that I am not getting data back. I have it filtered per organisation so the user only views what is related to them.
 
I have table permissions for the virtual table set up for Authenicated Users and the test user I am using has that web role.
 
Here is the code for the filtering:
 
{% if userCompany %} {% fetchxml filteredCompanies %}
  <fetch>
    <entity name="Support">
      <attribute name="orgid"></attribute>
      <attribute name="heading"></attribute>
      <attribute name="subheading"></attribute>
      <attribute name="supportdetails"></attribute>
      <attribute name="date"></attribute>
      <filter>
        <condition attribute="orgid" operator="eq" value="{{ userCompany }}"></condition>
      </filter>
    </entity>
  </fetch>
  {% endfetchxml %}
 
  <table class="table table-bordered table-striped" aria-describedby="support-table-desc">
    <caption id="support-table-desc" class="sr-only">
      Support records for your company
    </caption>
    <thead>
      <tr>
        <th scope="col">Date</th>
        <th scope="col">Heading</th>
        <th scope="col">SubHeading</th>
        <th scope="col">Support Details</th>
      </tr>
    </thead>
    <tbody>
      {% for record in filteredCompanies.results.entities %}
      <tr>
        <td>{{ record.date | escape }}</td>
        <td>{{ record.heading | escape }}</td>
        <td>{{ record.subheading | escape }}</td>
        <td>{{ record.supportdetails | escape }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
  {% else %}
 
  <p>No company information found for your user profile.</p>
  {% endif %}
Categories:
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    1,135 Moderator on at
    Hi,
     
    As per your description, you are using a Virtual Table in Data verse that points to a SharePoint list, and you are filtering records by orgid so users only see data related to their organisation. However, no data is being returned.
    This is a common issue with Virtual Tables in Power Pages.

    Important Limitation
    Virtual Tables (especially SharePoint-backed ones) do not fully support FetchXML filtering and table permissions in Power Pages the same way native Dataverse tables do.
    • Even If the Table permissions are correctly configured.
    • The user has the appropriate web role.
    • Your FetchXML syntax is valid.
    Power Pages may still fail to return data. This is often due to limitations in how the platform translates the FetchXML request into an OData query that the virtual table provider (in this case, for SharePoint) can understand, particularly when evaluating security or filtering on specific column types.

    Follow below to confirm the setup and identify the exact point of failure:
    • Confirm the Exact Logical Name: This is the most common pitfall. Double-check the logical name of your virtual table (e.g., new_supportcr68f_supportlist), not the display name ("Support"). Use this exact name in your FetchXML entity tag. You can find it by making a test query in the browser's developer tools (Network tab) to see what name is being called.
    • Test Without the Filter: Temporarily remove the <filter> condition from your FetchXML.
      • If data appears: This confirms the table permissions and basic connectivity are working. The problem is specifically with filtering on the orgid column.
      • If no data appears: The issue is likely with table permissions or the virtual table connection itself.
    • Inspect the orgid Column:
      • Data Type: What is the data type of the orgid column in your virtual table? Is it a Text field, or is it a Lookup to another table (like your organisation table)? FetchXML filtering on lookup columns in virtual tables is notoriously problematic in Power Pages. If it's a lookup, you may need to filter by the lookup's GUID or name in a specific way that the provider accepts.
      • Value of {{ userCompany }}: Ensure this Liquid variable is outputting the exact, expected value (e.g., the GUID of the organisation, or the exact text string). Print it on the page for debugging: <p>Company Value: {{ userCompany }}</p>.
    • Check for JavaScript Errors: Open your browser's developer console (F12) when loading the page. Sometimes, underlying errors from the virtual table call are logged there, giving a more specific clue.

    Hope this helps.
     
    Thanks!
    Inogic

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!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 14 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 13

Last 30 days Overall leaderboard