locked
How do I create a Hyperlink to a related document (in a library) from DVWP based on a List - there is a common field

    Question

  • Wow, that's a long title.

    I have a MOSS site which has a list (called RCA Register) and a library (called RCA Reports). The list has a column called RCAID and the library only contains ONE document with the same value in its RCAID field. I don't want to simply attach the report document to the list item because we need a lot of metadata to be associated with the document. The RCA Register list has a single row for each RCA, so I should be able to set up a DFWP in SPD and, somehow, create a hyperlink on one of the list columns which will OPEN THE CORRESPONDING REPORT document from the RCA REport library.

    Much Googling around has revealed a lot of "that's almost what I want" results but I just can't make them work for me.

    Can someone give me a clue how to set up such a hyperlink. I know how to format a field as a Hyperlink, it's the hyperlink options dialog I am having trouble getting my head around.

    Cheers,

    Mark

     


    Mark
    • Edited by emjem Wednesday, February 01, 2012 2:54 AM typo correction
    Wednesday, February 01, 2012 2:52 AM

Answers

  •  

    Hi Mark,

    How about try to achieve this with Linked Data Source?

    You can create a hyperlink column in your document library first and assign it with its own URL. Then create a linked source per this article between the list and library. Now you can create a Data View Web Part(DVWP) in this list or other locations and fill this DVWP with the linked data source. You need to insert the list fields(include RCAID and other fields you need) into this DVWP first, then insert the library fields(in your scenario, should include RCAID, hyperlink field and other metadata you want) as Joined SubView. And use RCAID field to match data.

    Now you can check the result. In the page where DVWP located, for each list item, it should has a subview where has fields populated from library based on corresponding RCAID value.

    Hope this helps.

    Thanks.


    Pengyu Zhao

    TechNet Community Support

    • Marked as answer by Mike Walsh FIN Friday, February 10, 2012 9:24 AM
    Tuesday, February 07, 2012 7:25 AM

All replies

  •  

    Hi Mark,

    How about try to achieve this with Linked Data Source?

    You can create a hyperlink column in your document library first and assign it with its own URL. Then create a linked source per this article between the list and library. Now you can create a Data View Web Part(DVWP) in this list or other locations and fill this DVWP with the linked data source. You need to insert the list fields(include RCAID and other fields you need) into this DVWP first, then insert the library fields(in your scenario, should include RCAID, hyperlink field and other metadata you want) as Joined SubView. And use RCAID field to match data.

    Now you can check the result. In the page where DVWP located, for each list item, it should has a subview where has fields populated from library based on corresponding RCAID value.

    Hope this helps.

    Thanks.


    Pengyu Zhao

    TechNet Community Support

    • Marked as answer by Mike Walsh FIN Friday, February 10, 2012 9:24 AM
    Tuesday, February 07, 2012 7:25 AM
  • Hello Pengyu

    Thanks for that idea. I will give it a try next week and post back, but I think you have given me the little push in the right direction that I needed.

    Mark


    Mark

    Thursday, February 09, 2012 11:53 PM