A lot is wrong in your code.
SUBSTITUTE does not exist for Calculated Columns
Besides that, you are mixing separators, using ; in your if statement (international notation) and , in your substitute
You CAN however have a Calculated Column outputted as HTML
PROVIDED YOU SET THE DATATYPE TO NUMBER
="<a href='#' onclick=""alert('"
- Besides the references to (exsiting columns!!!) Title and Info it is all one string;
so no worries with using ; or , parameters on international systems
- SharePoint strings start or end with ", so an escaped quote "" is needed to open de onclick definition and NOT close the SharePoint string.
Using a single quote here would make the single quote unavailable in
the JS code
- The Title is wrapped in single quotes so the JScode treats it as a String; otherwise
- The RegEx replace can be done much smarter but would be unreadable if you're not familiar with RegExs, so I left the 2 calls
alert( X )
document.location = X
to make it work like a link
and off you go
Wrapping an IF around it:
=IF(ISBLANK(TITLE),"","<a href='#' onclick=""alert('"
- the IF formula parameter separator here is a , (comma)
test to see if you need a ; (semi-colon) on your local system
- I left the i (ignore case off the Regular Expressions search) not needed for space and /
Be Aware this is using the undocumented behaviour of setting a Calculated Column to datatype Number; if Microsoft changes this it might not work any more and you would have do to it the CSR/JSlink way.
But .. this method is less stressfull on both Server and Client; major difference being this code is downloaded for every ListRow whereas CSR code is downloaded once then called from every row. With just a few characters like in this link example, this approach is faster than CSR