Using a view control, mark the var property with something like rowData
Then in your column, for the Data section, set it to a computed value with something like this. I have a field called refnum which I want to appear in the column as a link to open the document. I also have a field called docID which stores the UNID of the document which I use to build the link.
I can't seem to get this to work in a categorized view at all.
var refnum = rowData.getDocument().getItemValueString('refnum')
var unid = rowData.getDocument().getItemValueString('docID');
var url = "0/" + unid + "?opendocument"
return "<a href='" + url + "'>" + refnum + "</a>"