Question: I have a column in Sharepoint 2013 and set the type to 'Calculated'. I have set the data return type to integer (pic attached) so that the field is hyperlink.
[![Calculated field - setup](https://i.stack.imgur.com/KTgRP.png)](https://i.stack.imgur.com/KTgRP.png)

All worked fine for over a year in all environments (dev and production) and browsers (chrome, firefox, IE) until recently when users reportted the hyperlink was not clickable anymore and displayed as text (pic attached). Inspecting the element, reveals the value of is treated as text.
[![Calculated field - as displayed on UI](https://i.stack.imgur.com/wEKt6.png)](https://i.stack.imgur.com/wEKt6.png)

I have spent some time simplifying the formula, removing fields and having a simple element to navigate to google, but have not found a solution. I suspect there may been a Sharepoint update which handles the formula differently creating text inside the element surrounding it with double quotes.

Answer: 
After research I have found the cause and the solution to my problem.

**Cause**

SharePoint update removed the ability of calculated fields to be set us markups and is explained in [Handling HTML markup in SharePoint calculated fields](https://support.microsoft.com/en-gb/help/4032106/handling-html-markup-in-sharepoint-calculated-fields).

**Solution**

I have found a solution with JSLink. After opening link above, there are some examples using JSLink. With a bit of play-around, I managed to achieve having the calculated field as a hyperlink. The steps are simple. 

1. Create a js file with code - in my case I create a hyperlink which posts to another list with values from current item.
2. Copy link location of js file.
3. Reference js file on web part on view, under section Miscellaneous.
4. Voila!

Note: in the script, the field name must be the internal field name, that slowed me down quite a bit. to get the internal field name, open list settings, hover over desired field and on the bottom left of your browser you get the internal field name (Field=Internal field name here).

JSExample can be found [here](https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a).

Another helpful read [here](https://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views).
As mentioned as a follow-up by the original poster, as of June 2017, you can't do this anymore. 

For SharePoint Online, the alternatives are to embed some JavaScript on the page or to use the new [SharePoint PnP Fx Extensions](https://github.com/SharePoint/sp-dev-fx-extensions). If you have your own SharePoint Server, you can use the API [i.e. through PowerShell] to modify the Web object's CustomMarkupInCalculatedFieldDisabled property. 

I needed a little bit more robust solution, so I created a SharePoint Extension to do this. You can [view it from GitHub](https://github.com/JNadrowski/js-field-url-link). The instructions should be able to get you up and running in a couple minutes. I find it much easier to manage than the JavaScript alternative.