Aug 09 2019 12:47 PM
Aug 09 2019 12:47 PM
In SharePoint Online I have a doc library (Reference Docs) and a list (Projects).
The goal is for users to choose a doc from a lookup drop-down in Projects, which, when clicked, will directly open the chosen document stored in Reference Docs.
So, in Reference Docs I created a workflow that sets the value of the Title field with the Name field.
In Projects I created a lookup column referencing the Title field in Reference Docs
All works fine, except the link opens the document properties, not the document itself.
This should be simple, but I just can figure out what is incorrect.
Any help will be appreciated.
Aug 09 2019 01:40 PM
Aug 09 2019 02:10 PM
Thanks for the reply. Maybe I wasn't clear in my question.
The list (Projects) is like a spreadsheet, not a form. In Quick Edit, I wanted users to choose a document from a look-up column connected to a library (Reference Docs).
Since you can't base a look-up on the Name column, I assumed you could achieve this by setting the Name field to the Title field and basing the look-up on the Title field.
Everything works, except when Quick Edit is closed the look-up column shows the document name as a link, but clicking it opens the document's properties page, not the document itself as you would get by clicking the Name column.
Does that make more sense?
Sep 09 2019 09:00 AM
I found the same issue. In the Classic UI, lookup documents opened directly from the list, but in Modern, clicking the document takes you to the document properties, which is not very useful.
Also, if you open the list item and click the lookup document, it opens a property window, but clicking the link to the document name doesn't do anything. The only way to open the document is to right-click and open in a new tab.
It appears that the functionality for opening lookup documents didn't come over from Classic. Not opening from a property window may be a bug.
Sep 09 2019 10:31 AM
Thanks for the reply. I figured this was the case.
I did get it to work, but it took a workflow and JSON coding to extract the link elements then combine them to recreate the link.
What was once simple is now way too complicated...
If you want details, please let me know.
Sep 10 2019 10:29 AM
A workflow copies the link from the Name column to a "linked" column in the doc library. To stop it from opening the doc's properties, it needs to be formatted using the following JSON:
I then used a look-up column to pull this link to a data list, and formatted it with the same code.
Let me know if you need anything else.
Nov 13 2020 01:49 AM - edited Nov 13 2020 01:51 AM
I had a second lookup column that was coded with JSON to show a button as the link:
Unfortunately, my internal customer has discovered that they no longer get links :(
I am assuming that there has been an Evergreen update that has broken the functionality?
I found this thread in my research to find a new solution.
Feb 26 2021 07:03 AM
I am in a very much similar situation as you were.
I have a "Topics by Meetings" list in which Topics (from topics library) are associated with each Meeting (from Meetings List).
This was structure as such, because each Topic can be discussed in a series of meetings before it is actually "approved", while:
- the "evolving" documentation remains one single Topic folder
- the "Topics by Meetings" registers all the comments discussed about the Topic in each Meeting
In this image, you will see the "Number" column which is a "lookup" from Topics as a hyperlink.
As you mentioned, the hyperlink points to the Document Properties rather than the actual Folder.
I tried to apply you json formatting....
and it resulted as follows:
Would you know what am I missing to get the hyperlink properly pointing to the original lookup folder ?
Appreciate any inputs...
May 19 2021 03:15 AM - edited May 19 2021 03:15 AM
On a lookup field, you need to reference @currentField.lookupId and/or @currentField.lookupValue to access its properties.