views:

3178

answers:

3

Hi,

Background:

I have an items on the sharepoint list. I also have a corresponding folder in a document library that contains documents about this item. I want to be able to get to this folder straight from the item properties. I have tried to create a lookup column containing folder ID, but that doesn't help cause folder is not a type and it just doesn't work. Other solution would be to create link column but if I will create it staticly - after creating alternative mapping (and getting to the page from the internet for example) it won't work. (so solution posted here won't work for me).

I want to create this link from sharepoint workflow. I have a custom action that can return any info about the folder I want (ID, URL etc).

Question:

How to link from sharepoint list item to a folder in document library?

A: 

I would personally try to avoid using folders. In numerous instance I've found they arn't worth the trouble and the key with SharePoint is not to reproduce the typical folder hierarchy that you'll find on a file system. Break away from that mess and do it the SharePoint way and put the documents straight into the list and use views and metadata to break up the documents into manageable groupings.

That said, a folder is it's own content type and it works perfectly well in a lookup column. You have to reference the list item id for the folder of course. I just created a folder in a standard document library, added a lookup column to a custom list and successfully referenced the folder in a new item. When I click the folder lookup then I get taken to the folder item, which contains an "Open" link that takes me to the documents contained within the folder.

Dan Revell
Wow.. I've just checked and it worked. My problem was I used property that does not exist for a folder as a link name (and then I was trying to troubleshoot a workflow inspite of the list). Thanks for checking it out and pointing the problem! About lists - I will have over 300 elements on the base lists so my workflow would need to create 300 separate lists. I'm a little afraid to go this way.
kyrisu
Actually I have found a bug elsewhere. Workflow was run with System account privileges and folder was created also with system account. So it's probably a permission issue.
kyrisu
300 elements (documents in the list). I take it you mean that you associate a workflow to run on creation and then import 300 documents into the library in which case every document will get an instance of the workflow starting. An insane suggestion not because of performance, but for the poor user that'll get 300 tasks. Perhaps you want to associate the workflow after the import. You'll never want all items to have a workflow at teh same time will you?
Dan Revell
kyrisu
A: 

I am trying to understand this and see if it applies to my situation. Not sure yet...

My site is for an insurance company and has a document library that contains a set of folders (I know, but the client requested it) called Property Documents. Each folder name is an address (the folder is also a content type). All docs within each folder are related to the the insurance policies for the property located at that address.

I have a corresponding list (Policy Data) that contains the insurance policy information. There can be one policy covering several different properties, and each property can have more than one policy related to it (since each year when the policy is renewed it gets a new policy number).

I have a web part page showing a dataview of the Policy Data list that groups the data by Policy Number. I want to make the Address field a hyperlink that will take the user to the document library folder for just the documents related to that property address.

How can I enable this?

Nancy
You could use hyperlink field but as you said Policy Data item can point on multiple folders which I think is impossible using build in hyperlink field. On the other hand you can use multivalue lookup field which can point to multiple folders but it will point to folder properties, not the contents (you will need to click open after you get to folder properties).
kyrisu
A: 

Dude i got a simple solution Out Of the box ; i discovered it a while ago :

the solution is to make a Column named title ; Then create a new folder ; then press action>edit with spread sheet > then write the title for that folder this phase is now finished then in the lookup colomn you can refere it to the title colomn you will find the folder is there

thanks to me

Amjad