Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

I'm struggling with getting FetchXML to work on an entity list filter displayed in the Portal...

           <filter adx:uiname 'CRS Number'>  
              <condition attribute='crsnumber' operator='eq' value='CRS Number' adx:uiinputtype = 'text' />  
           </filter> 

This code seems to work with the 'like' operator, but not with 'eq'. The field I'm searching is a string if that has any relevance. There are no results returned with 'eq'.

The code is the same as the Downloaded XML from the Advanced Filter (which works perfectly btw), with the addition of the adx text input box so that users can enter their own filter data.

Is this me? Or is this a bug in D265? Please help.

Thanks

Laura 

Categories:
  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    Hi Laura,

    You are correct. Its returning other records as well.  Sorry couldn't help much. It does look like a bug or imitation of unable to use eq.

    You can contact Microsoft Support to get this confirmed.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    Hi Ravi,

    I really appreciate your help. This is driving me mad! :)

    I used your code format: 

    <filter type="or" adx:uiname="CRS Number">

    <condition attribute="crsnumber" operator="like" value="" adx:uiinputtype = 'text' />

    </filter>

    If I enter 14, all records with "crsnumber" equal to 1499795, 14967930, 14986672, 1449 etc etc appear.  So it's only doing a 'like' filter on 14*... 

    I've tried using the "eq" operator too:

    <filter type="or" adx:uiname="CRS Number">

    <condition attribute="crsnumber" operator="eq" value="" adx:uiinputtype = 'text' />

    </filter>

    But if I enter 1449 no records are returned at all. 

    Thanks 

    Laura

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    Hi Laura,

    Can you share which code didn't work? For me, if I use like operator (without the  %% in the value) then it only returns the exact match i.e. if yusers type in 14 they will ge record value with 14.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    This code works:

    <filter>  

                 <condition attribute='crsnumber' operator='eq' value='1449' />  

    </filter>

    But I want the user to be able to specify the value. Is there another way? Without adx maybe??

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    Hi Ravi,

    Thanks for your reply. However, this still doesn't work for me.

    If I enter 14 in the text box, 1449 and 14491 are returned. The result I want is that only 1449 is returned.

    Any other ideas?

    Thanks

    Laura  

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: FetchXML 'eq' operator doesn't seem to work for an entity list filter displayed in the portal

    Hi,

    It appears that with adx:uiinputtype = 'text', you can only apply like operator. Though the documentation doesn't say that you cannot apply eq filter, I would assume this as a bug or limitation. The example also uses the like operator.

    Nevertheless, you can still use like operator which works like eq, basically remove the %% from the value and then it will return the exact attach.

    I tried it and it worked for me:

    ============

    <filter type="or" adx:uiname="Application ID">

           <condition attribute="new_applicationid" operator="like" value="" adx:uiinputtype = 'text' />

         </filter>

    ============

    Hope this helps.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans