Home › Forums › vLooup for SharePoint › Is Hyperlink in VLookup possibe
Tagged: vlookup hyperlink
- This topic has 10 replies, 3 voices, and was last updated 5 years, 9 months ago by David Jeremias.
-
AuthorPosts
-
-
November 9, 2015 at 22:37 #9229
Hi, I would like to know if there is a way to make a field/column in the vlookup a hyperlink. I have one use case where I would like the ID column of the field to hyperlink to a custom webapp that generates a PDF. The second use case is to hyperlink an email address.
Thanks for any ideas.
John
-
November 12, 2015 at 00:03 #9253
Hi,
Add a “dummy” field to your vLookup config like in this image:
And then use this code in the Custom JS:
function getHyperlink(fin,item){ return "<a href='https://spjsblog.com?MakePDF=1&ItemId="+item.get_item("ID")+"' target='_blank'>Make PDF</a>"; }
Obviously you need to change the URL, but you get the idea.
Let me know if the “dummy” field gives you an error – I cannot remember which version I added this option…
Let me know how this works out.
Alexander
-
November 12, 2015 at 01:38 #9256
Thanks for the help Alexander. I don’t get an error when adding the dummy field, but the vlookup just fails to load, and all vlooks after it on the page fail.
I’ve got DFFS backend v4.2353, vlookup backend v2.002, spjs-utility version 1.205.
-
November 12, 2015 at 07:50 #9258
I checked the change log, and saw support for the “function” in the “special configurations” textarea was added in v2.251.
This means you must update your vLookup FRONTEND to this version or later.
You can bring up the developer console (hit F12 > Console) to look for error messages, but I guess your current version complains about the “[dummy field]” not being a proper field.
Alexander
-
November 12, 2015 at 14:11 #9263
To upgrade, can I just replace the _min.js file(s)?
-
November 12, 2015 at 14:25 #9265
Yes
-
December 11, 2015 at 21:25 #9549
We finally got DFFS upgraded and this solution works great.
Thanks again Alexander,
John
-
December 12, 2015 at 00:42 #9567
Thanks for the feedback. I’m glad it worked out.
Alexander
-
March 15, 2019 at 23:16 #24323
Hey Alexander – Would it be possible to make this vLookup hyperlink open in a modal window?
Thanks!
David -
March 16, 2019 at 10:00 #24334
Yes, just change the Custom JS snippet like this:
function getHyperlink(fin,item){ var url = "https://spjsblog.com?MakePDF=1&ItemId="+item.get_item("ID"); return "<a href='javascript:void(0)' onclick='openInDlg(\""+url+"\")'>Make PDF</a>"; } function openInDlg(url){ var options = { "allowMaximize": true, "showClose": true }; SP.UI.ModalDialog.commonModalDialogOpen(url, options, function (result) { if (result === 1) { // Dialog was saved }else{ // Dialog was closed without save } }); return false; }
Alexander
-
March 19, 2019 at 22:45 #24363
Thanks Alexander! Worked perfectly.
-
-
AuthorPosts
- You must be logged in to reply to this topic.