2
votes

I'm developing a customized document library in the SharePoint 2007 environment. What I'm doing is creating a content type with multiple columns of information related to the document. Users will use this content type to upload new documents rather than the standard new document functionality. One of my columns in this content type is proving to be more difficult than I can handle.

The column is essentially supposed to be a sort of 'related documents' column, where it offers the user the option to select another document that is related to this document. So I thought I'll create a lookup column that displays the titles of all other documents in the library and allows the user to choose one. Simple enough, but I need much more functionality than this...and here is where I need help.

I need the related document column to actually link to the related document, not just display the title...not in edit mode while a user is adding a document, just in the standard document library view after the document has been added.

I also need the link to include a url variable that is stored in another column named 'Document Number'.

I assume this will require custom coding which is fine. Please not that I can't use SharePoint Designer. I use Visual Studio and code must be C#. This will be packaged and released as a feature.

Can anyone help me acheive this? Example code, suggestions, etc...? Thanks!

1

1 Answers

1
votes

I would suggest using a multi-column field as your base value type - this article on MSDN should get you started. For rendering the field in document library views, you will need to use a rendering pattern. Conveniently, MSDN has an example of a multi-column RenderPattern.