In the transformation, the row should be the normal {% %} context, so you should do the following.
For the DocumentURL and Name, you may need to use DocumentContext.DocumentURL and DocumentContext.DocumentName though if those values are not from the custom table.
{% if(DocumentContext.CurrentDocument.NodeID == SolutionID) { return "<a href=\"|+DocumentURL+"\">"+DocumentName+"</a>"; } |(identity)GlobalAdministrator%}