1

I have a library that holds documents, of course. I also have a list that (in each item) has a few columns that lookup from that library's document properties. What I'm trying to do now is create a link to the document (in the library) in the list. I've tried looking at another lookup column for this, but I can't make that work. Any ideas?

2 Answers 2

1

You can do this by adding a hyperlink field and a workflow to your target list.

When an item is updated, check if the lookup field has a value. If it is not blank, update the hyperlink field to have the server relative url from the lookup list: enter image description here Filename here is the hyperlink column.

4
  • Please clarify - The instructions state "When an item is updated, check if the lookup field has a value. ". This means I need to add a lookup column - but should I add it to the LIST or add it to the LIBRARY?
    – DanJ
    Mar 23, 2020 at 18:22
  • The only thing you would need to add is a hyperlink column, your question stated that you already had a lookup defined. What I am referring to as the "target list" is the LIST - not the LIBRARY. That is where you want the link to display right? Mar 23, 2020 at 18:33
  • Yes. I initially tried to do this using Nintex Workflow, but ended up doing it just like you showed in SPD. It does indeed work, thank you. On a related note, is there a way to shorten the link displayed? (In know in HTML we'd show something like <a href="www.whatever.com">DISPLAYED TEXT</a>. Ideas?
    – DanJ
    Mar 24, 2020 at 14:15
  • Glad to help! I think you must build a custom string to do that - it should be in the format "hyperlink, display text" (without quotation marks) Mar 24, 2020 at 14:37
1

To create a link to the document (in the library) in the list, there are some options:

  1. Create a hyperlink column in the list.

  2. Use the "Attach File" option from the actions menu.

  3. Create a lookup column type. In the "Get information form:" select the document library you wish to link to.

Reference:

https://www.epmpartners.com.au/blog/how-to-link-a-list-item-to-a-document-library-document/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.