When I use SPServices to query a list it brings back some of the columns with odd prefixes and encoded characters.

How can I get rid of the Oddball characters? I recognize the @amp; as a HTML encoded character... but what's with this 5;#
**What is the pattern so I can filter it out?

See results from Chrome List.asmx request: ows_DocType='2;#P&ID' ows_Complex='5;#Complex' etc...

enter image description here


This is the standard format used by SharePoint to return lookup values. For example 5;#Complex means that the item ID is 5 and its Title is Complex.

The same format is also used for multiple lookups. The Web service will return a chain like this:

  • For the record you'll also see # in other column types like calculated columns. – Christophe Mar 28 '13 at 16:24

All the columns that have number prefixes are lookup type columns.
When I look at the Data in JSON

<d:DocTypeId m:type="Edm.Int32">2</d:DocTypeId>

My guess is that SharePoint uses that as a reference. Since the actual value doesn't exist in that direct table is my guess. On my test site the odd prefixes don't show up.

enter image description here


  1. see Microsoft Technet
  2. see Blog PeteStilgoe.com

Syntax is: “ID;#Value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.