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 am using word automation services to convert docxs to pdf. This works fine, and I add the metadata (Strings) to the resultant pdf. However, how can I add lookup value fields to the document's list item?

Item["Field"] = LookUpField[1]; (where "Field" is of type Lookup).

LookupField is a collection of type List and stores the value of the list item field from the docx value.

I get this error:

ex = {"Invalid look-up value.\n\nA look-up field contains invalid data. Please check the value and try again."}

What's the best way to do this?


share|improve this question
up vote 2 down vote accepted

Lookup values should be either integers which represent ID of the target element in the lookup list, or strings formatted as id;#title.

For example:

item["FieldName"] = 10;
item["FieldName"] = "10;#Target item title";

Thus I would recommend you to check in debugger, what values do you have in the LookUpField collection.

Also you could try using ParseAndSetValue method, i.e.:

var field = item.Fields.GetFieldByInternalName("FieldName");
field.ParseAndSetValue(item, 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.