I currently have view with documents containing two fields - “Title” and “TargetLink”.
On an XPage, I want a view control showing only the Title of every document as a link, and the link URLs should be the TargetLink field.
Using this post as a guide, I tried doing the following:
In the view properties, I set data->var to “rowData”.
In the column properties, I set data->pageUrl to be computed on page load with the script
“rowData.getDocument().getItemValueString(‘TargetLink’)”
When I try the XPage in a browser, I get the error lines:
Error while executing JavaScript computed expression
Script interpreter error, line=1, col=9: Error calling method ‘getDocument()’: ‘rowData’ is not a valid object
It then shows my pageUrl script as the line on which the error occurred, so it seems as if the “rowData” var either doesn’t exist at all, or is out of scope.
Can this be done? If so, how?