locked
Opening Related Document from a Document Library RRS feed

  • Question

  • Hi all,

     

    I have a list and document library in SharePoint 2010. Using a webpart to display list items in SPD, I want to have a link so that I can open a document from the document library. The list has a field called Variable with the same value in the document library field called Active. How can I construct the URL in the webpart link column so that it will open related document if  one exists?

     

    I have tried the following but it is opening the document library but not the actual document:

     

    https://...sites/mylist/Forms/AllItems.aspx?Variable={@Active}

     

    Thank you in advance.


    Ephi
    • Moved by Mike Walsh FIN Wednesday, August 17, 2011 5:18 PM If you have SP 2010 why are you posting to a pre-SP 2010 forum? (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Wednesday, August 17, 2011 3:42 PM

Answers

  • Create a field where you want the URL path we'll call it "attachment," set that as a hyperlink field. 

    Then go into SharePoint Designer, and set a workflow.

    Do this workflow in the document library, not the list.

    Use the action: Update list item in [list]

    then click on "this item"

    Make sure your updating the item in [list] not [document library] or [current item]

    Then click add - you want to update "[List] attachment" with "current item: URL Path"

    and at the bottom you just put "variable" and "active" because those are the fields that define where it is updated.


    • Proposed as answer by Brett N 13 Wednesday, August 17, 2011 8:31 PM
    • Marked as answer by Emir Liu Friday, August 26, 2011 2:57 AM
    Wednesday, August 17, 2011 8:28 PM

All replies

  • I am not 100% sure I understood the case, but seems to be a straightforward 2 web part connection on the common field (variable/active). Just add the two (list and library) to a web part page and connect the list to the library on the common field.
    AK
    Wednesday, August 17, 2011 6:57 PM
  • Create a field where you want the URL path we'll call it "attachment," set that as a hyperlink field. 

    Then go into SharePoint Designer, and set a workflow.

    Do this workflow in the document library, not the list.

    Use the action: Update list item in [list]

    then click on "this item"

    Make sure your updating the item in [list] not [document library] or [current item]

    Then click add - you want to update "[List] attachment" with "current item: URL Path"

    and at the bottom you just put "variable" and "active" because those are the fields that define where it is updated.


    • Proposed as answer by Brett N 13 Wednesday, August 17, 2011 8:31 PM
    • Marked as answer by Emir Liu Friday, August 26, 2011 2:57 AM
    Wednesday, August 17, 2011 8:28 PM