SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 1 down vote accepted

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:

share|improve this answer
Christophe Thanks! – Ben_Coding Mar 28 '13 at 16:22
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

Syntax is: “ID;#Value

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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