If you are building a CAML Query to match a value that contains a special character like & (say SharePoint&InfoPath), you will receive an error, and the query will fail.
Resolution - Handle this the way you handle special characters in XML. Include your value within < ![CDATA[ value ]] >. Incorrect (throws error) -<Eq><FieldRef Name="Title" /><Value Type="Text">SharePoint&InfoPath</Value></Eq>
Correct -<Eq><FieldRef Name="Title" /><Value Type="Text"><![CDATA[SharePoint&InfoPath]]></Value></Eq>
In real scenarios, build your CAML Query by appending the value in the query, like<Eq><FieldRef Name="Title" /><Value Type="Text"><![CDATA[ + value + ]]> </Value></Eq> [where value = text to be matched]
More Posts related to SharePoint,
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
- PowerShell iterate and get all SharePoint sites and sub sites
- SharePoint Online: Editing session has ended Message
- How to Share Microsoft SharePoint Site with Users or Groups
- How to delete SharePoint Online List Item using REST API
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- How to disable SharePoint subsite creation option for owners
- SharePoint 2010 August 2015 Update KB3055049 - Duplicate Document ID issue bug fixed
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly.
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Error when deleting SharePoint Online folder or file
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- How to generate client id and secret to register SharePoint App with OAuth
- How to delete SharePoint List Item programmatically using C#.Net
- How to retrieve all SharePoint Online List Items using Rest API
- [Solved] SharePoint Search Internal server error exception
- Create SharePoint Site Collection using PowerShell New-SPSite
- Fix SharePoint PowerShell error - The term Get-SPweb is not recognized as the name of a cmdlet function script file or operable program
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- SharePoint Server 2016 installation System Hardware requirements
- How to create SharePoint Online List Item using REST API
- Changed AD user display name showing old name in SharePoint
- Recommended size and resolution for SharePoint Online Site logo
- Microsoft 365: How to Turn Off Delve in SharePoint Online for All Users
More Posts:
- Android Emulator cannot be opened because the developer cannot be verified. [M1 Mac] - Android
- Screen Mirroring iPhone to TV - iOS
- MySQL: How to Select Database via Terminal/Command Line - MySQL
- How to see storage usage details on OneDrive on Mac? - Windows
- How to install pip on macOS using terminal command [Python] - Python
- 3 Ways to Change Default 8080 Port in Spring Boot - Java
- How to Recover Deleted Messages on iPhone - iOS
- How to check your IP using bash for Windows? - Bash