web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Fetch XML Filter givin...
Power Pages
Unanswered

Fetch XML Filter giving error

(0) ShareShare
ReportReport
Posted on by 8

Hi community!

I'm currently trying to make a filter like dropdown checklist with FetchXML on a List and I'm getting this errors that are blocking me to Save and Test.

I tried it with XrmToolBox and it works fine.

 

Thanks in advance!

Categories:
I have the same question (0)
  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @Geadas,

     

    if the toolbox works fine I guess the XML Code is correct.

    Where do you get which error?

    Where and how do you embed the liquid code?

  • Geadas Profile Picture
    8 on at

    I tried to use the FetchXML to create a filter for a List, I added a print on the post.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Geadas 

     

     

    Because you have mentioned. XRM Toolbox fetch XML is working fine. There are two important ground rule 

     

    1.  Make sure you have set the table permissions for the table you are adding in Fetch XML. In your case, it is "cca_opportunityskillname". Also, remember to add appropriate web roles to the table permissions. Example below. 

     

    ragavanrajan_0-1705355244743.png

     

    2. Use Portal Management > Under content > Lists> Choose your list > General> Scroll down to the last "Filters" 

     

    Use FetchXML Filter > and paste your query here. Screenshot below 

     

    ragavanrajan_1-1705355342299.png

     

    Hope it helps.
    ------------

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

     

  • Geadas Profile Picture
    8 on at

    Ok I understood your example, but I'm trying to make a FetchXML filter let´s say for example on Opportunities.

    On Opportunities List I want the Opportunity Skill to show too. I already have a lookup made, actually if I do a Dynamic Lookup Set Filter it detects the skills but I want it custom with FetchXML.

  • fm_skeller Profile Picture
    277 Moderator on at

    The custom FetchXML filter needs just the <filter></filter> bit, not the entire FetchXML:

     <filter>
     <condition attribute="description" operator="eq" valueof="description" />
     </filter>
  • Geadas Profile Picture
    8 on at

    Ok, now I only need to show the data on the List from the other table (Opportunity Skill), right?

  • fm_skeller Profile Picture
    277 Moderator on at

    That kind of depends on what you are trying to do?

    FetchXML filters are usually static - like 'list all records with a name starting with A': 

    <filter type="and">
     <condition attribute="name" operator="like" value="A%" />
    </filter>

    You can use javascript to update the query value - so if you have an optionlist with all possible Opportunity Skills you could set the filter to the selected value of the optionlist I suppose.

    Why are you using a fetchxml filter, and not a dynamic lookup set - which is meant for filtering on related tables?

  • Geadas Profile Picture
    8 on at

    I´m trying to use FetchXML instead of Dynamic Lookup Set because I want to make a dropdown checklist filter and I want to filter the results to only show non-repeated values (ex: only show SQL one time, .NET, Python, etc...), which is something that doesn´t happen with Dynamic Lookup Set.

  • fm_skeller Profile Picture
    277 Moderator on at

    Ah, didn't quite get that the opportunity skill table has repeated values in it. I guess it depends on your data model what would be the best solution - using FetchXML filter in combination with a optionlist that has the unique values and javascript to set the actual filter should work.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard