Help with using an Internal URL in SharePoint column with out the https:// being present

Seven0fNine
Seven0fNine used Ask the Experts™
on
Hi, any help with this enigma! would be much appreciated. I am using SharePoint 2016 on-prem,,,,,

ISSUE:
I have created a new SharePoint list and would like to use an an internal URL in a SharePoint hyperlink column control. The Internal URL loads a client-side program. Unfortunately, the hyperlink control insists on the https:// to be present. The internal URL does not require http:// or https://.  See image of the internal URL .

Sharepoint-Hyperlink-column.png
I have tried using a new 'single line of text' column and the Edit Source option to add a <a href> tag to create a hyperlink for the internal URL and some javascript. Again, SharePoint strips out the code leaving a dud hyperlink.

Is there a column / setting that allows a URL without the https:// OR is there a way of using the SharePoint hyperlink column initially with the https:// and then (via code) when the hyperlink is clicked on the https:// is ignored / removed and the Internal URL is just read?

Thanks in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Walter CurtisSharePoint AED
Distinguished Expert 2018

Commented:
Just a quick idea, may not work. Use a Multiple line of text column and use the RTF style of box, not the plain text box. You may be able to use the link you want from that column type.

Let me know if that helps...

Author

Commented:
Thanks for your suggestion, tried that  with rtf format and html code and still no luck. The hyperlink works in when in Edit mode, but as soon as the column is saved  - SharePoint strips out the code leading a dud hyperlink.

That said, looking at this quandary from a different perspective with SharePoint striping out what is sees is 'dangerous' code, can this validation be 'switched off' ?. SharePoint is only being used for my companies Intranet.
Walter CurtisSharePoint AED
Distinguished Expert 2018

Commented:
You can use a calculated column to render HTML correctly. You will probably have to 'allow' HTML markup in the web app. This article shows how to do this. It worked, I did it in my farm.

https://social.technet.microsoft.com/wiki/contents/articles/40146.sharepoint-online20162013-html-rendering-in-calculated-columns.aspx

https://support.office.com/en-us/article/handling-html-markup-in-sharepoint-calculated-fields-a3db28e4-747c-437e-b085-8f795b722a8c?ui=en-US&rs=en-US&ad=US

One thing these article may not mention, you will need to set the calculated column as a 'number' type. Here is an example of the formula I entered in the calculated column which includes HTML code.:

=IF(([Percent Free]>DiskThreshold),"<DIV style='font-weight:bold;font-size:14px;color:green'>"&(ROUND([Percent Free]*100,1)&"%</DIV>"),"<DIV style='font-weight:bold;font-size:14px;color:red'>Warning! "&(ROUND([Percent Free]*100,1)&"%</DIV>"))

Open in new window


Hope that helps...
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Just an update on this - i ended up diverting to another a custom webpage that extracted the parameters from the URL and then redirected to the desired internal URL (via extracted parameters). All working as expected. Thanks to those who replied :-)
Walter CurtisSharePoint AED
Distinguished Expert 2018

Commented:
Glad it's working for you. Thanks for the thanks!

Author

Commented:
Thanks for the thanks thanks !!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial