Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Lookup Fields

  Asked By: Stephanie    Date: Dec 12    Category: Sharepoint    Views: 1217

I am trying to set a custom lookup field on a list item
programmatically. I can set the property using the following code:

Dim listItem As SPListItem = docList.Items(0)
listItem("Product_ID") = "500"

However, I want the listItem to have multple Product_ID's associated
with it. I would like the Product column to look something like 500;
501. This is possible via the UI by I haven't been able to append
these values programmatically.

I can't just do
listItem("Product_ID") += ";501" or anything like that.

Any ideas?



1 Answer Found

Answer #1    Answered By: Damon Garner     Answered On: Dec 12

It does not appear that you can use the Content Query web part
to filter by a Lookup site column.

And since multiple text lines doesn't work either, I think I'm stuck
with single line of text - which has a 255 character limit. Not

Just to let you know, I'm trying to store all documents in one
document library. There is a column  called product_id that stores
which products use that document. This way, on each product  page I
was thinking that I would use the content query web part to filter
the documents for the product. This is the only solution I can think
of that will allow me to display relevant documents on each product
page, and also only have one version of each document out there. So
if product 123 and 456 use the same proposal form, I would store the
form in one central location, and have a content query part on each
product's site, displaying a link to that document. We have
thousands of product sites and I don't want to do this manually.

Didn't find what you were looking for? Find more on Lookup Fields Or get search suggestion and latest updates.