sharepoint - How to create a lookup column that targets a Doc Lib and uses the 'Name' of the document? -


How do you create lookup columns in the document library which uses the 'name' of the document as the lookup value?

I found a blog post that recommends adding another custom field like "filename" and then using an item receiver to populate the custom field with the value of the name field But it seems that if people are interested then please link to the blog:

I have got a bunch of custom document material type which I do not disagree with such a task Do not want to really work in any way.

There is a way you can do this (though not the easiest way) a custom field By creating the type which increases the SPFieldLookup class. The SharePoint field editor for the lookup field is not supported by the lookup field in hiding any column type, but you can create field editor for your custom field type, which shows them.

However, I have created a lookup column that points to the column before a name in a document library, and it probably does not work as you would expect, while the value stored in the lookup column is valid, View in the list view or view does not appear correctly on the form.

The solution you have posted can actually be the best way to handle it if you want to handle more complex scenarios, the lookup field requires some claddes, but the reason is That does not mean to provide similar functionality to the foreign key relationship in the database.


Comments