Thursday, February 16, 2012

SharePoint: Document Library as a Lookup field source

Went to create a Lookup field in a list to point at a document in a document library. Sounds pretty straight forward? Unfortunately not.

Document librarys use Name is the main column. It still contains the Title column but this column isn't required. When people upload files they will more than likely leave Title blank.

Move along to the Lookup field creation. You only have the option to pick:
Title
ID
Created
Modified
Copy Source
Version

Do you see the issue? The only good field to pick here is the Title field. But if all the Titles are blank you won't have anything to choose from?

At this stage the only workaround I can think of is to create a workflow which fills in blank Title fields on creation and on change. Messy but will fix this particular issue.

Good luck.