Skip to main content

Notifications

Dynamics 365 general forum

FetchXML Query not returning results when white space in text value

Posted on by 90

I'm querying the Solution table to pull the data for my solution. Here is my XML

<fetch>
<entity name="solution">
<attribute name="uniquename" />
<attribute name="version" />
<attribute name="versionnumber" />
<filter type="or">
<condition attribute="friendlyname" operator="eq" value="Engagement Portal" />
<condition attribute="parentsolutionidname" operator="eq" value="Engagement Portal" />
</filter>
</entity>
</fetch>

the problem is that the "Engagement Portal" syntax fails to return any results if I type in the value.
However, it works if I copy and past the value from the results returned if I query the entire Solution table in the FetchXMLBuilder app.

As well, in the FetchXMLBuilder, if I add a filter on the Solution table for the attribute "FriendlyName" equal "Engagement Portal", typed in to the value field, it return nothing.

however, do a query on all the records in the solution table, find and copy the "Engagement Portal" friendly name into Notepad then paste that value in the the Value field in the Filter and it works. ?????

Is there an issue with white space characters in the fetchXML? is it an ascii value problem that a copy and paste solves?

Any help would be greatly appreciated.

  • Suggested answer
    MichaelSchofield Profile Picture
    MichaelSchofield 90 on at
    RE: FetchXML Query not returning results when white space in text value

    You are correct I did some digging and found out that the white space that CRM returns is actually "Non Breaking Space". 

    I had to user Alt+0160 to give me the proper character to return the results correctly.

  • Suggested answer
    Justin Burch Profile Picture
    Justin Burch 25 on at
    RE: FetchXML Query not returning results when white space in text value

    It does sound like an ASCII problem - have you tried copying just the whitespace into a character checker (e.g. https://www.browserling.com/tools/text-to-ascii)?

    Are you also sure the Solution name doesn't inadvertently have two spaces instead of one?

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... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans