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

I want to create a lookup field with the sharepoint ui which points to a field with a custom field type (parent field type is number). In visual studio with the object model this is not a problem but in the sharepoint ui i can't choos the field from the "in this column" drop down field.

Maybe someone can help

share|improve this question

Unfortunately, it is not possible to create lookup where you have a Custom Field Type as a target field.

Basic reflector exploration leads to the following code:

      if (field.Type == SPFieldType.Counter || field.Type == SPFieldType.Text || (field.Type == SPFieldType.Number || field.Type == SPFieldType.DateTime) || (field.Type == SPFieldType.Computed && ((SPFieldComputed) field).EnableLookup || field.Type == SPFieldType.Calculated && ((SPFieldCalculated) field).OutputType == SPFieldType.Text))
        // ...

Thus, you can use only the following field types as a target for a lookup field:

  1. Counter (usually ID field)
  2. Text (Single line of text)
  3. Number
  4. DateTime
  5. Computed (only if SPFieldComputed.EnableLookups is set to true)
  6. Calculated (only if it's Output type is equal to Text)

And even using the SharePoint object model, most likely, you will get an exception if you try to create Lookup field with target field of the "forbidden" type.

share|improve this answer
Mike Smith has a post that documents a workaround to this issue:… – Stuart Pegg Jul 9 '12 at 11:19

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.