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
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.
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
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.
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??
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
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.