7

I have a client that has a Links page in SharePoint 2013. On the page is a column called URL that is set as a hyperlink column, but they want the column to accept pw://example.com/... instead of just http://example.com/...

Is there a way to change the hyperlink column to allow for this behavior? I considered creating it as a single line of text and then making that text box a hyperlink-enabled box. Is there another native option? If not, which of these would be easiest? I am new to SharePoint so any help would be appreciated! Thanks in advance!

 URL  
 Type the Web address: (Click here to test)
 pw://test
 Invalid URL: pw://test
2
  • AFAIK this isn't possible. You have to customize via JavaScript or link to an Application Page which in turn redirect to another protocol. Ref: social.msdn.microsoft.com/Forums/sharepoint/en-US/…
    – Benny Skogberg
    Jun 18, 2014 at 7:48
  • any idea why this method is not working now??? (it worked fine for a few months but suddenly stopped working (this week?)
    – stev
    Jun 14, 2017 at 0:08

1 Answer 1

2

Yes, but it is a little bit complicated.

  • Create two text columns, "URL" and "Display" (or whatever you want to call it).
  • Create a calculated field "Link"
  • Formula: =CONCATENATE("<a href='",URL,"' target='_blank'>",Display,"</a>")
  • Data Type: Date and Time (Can also be Number, but then will appear right-justified).
  • Date and Time Format: Date Only
  • Add an list item with URL "pw://test" and Display "Test" (or whatever you want the display text to be).
  • The view shown to your users should include "Link" but not "URL" or "Display".

Note that if you just want the link to display the URL, you can use just one field and change the formula to =CONCATENATE("<a href='",URL,"' target='_blank'>",URL,"</a>"). Also, note that I added target='_blank' to open in a separate page.

This was actually HARDER in 2007, you had to add JavaScript on the page to convert the Text to HTML. SharePoint 2013 made it easier.

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.