I am writing some Javascript in a computed field of a data view.
I am getting a handle on the current document, then trying to get the response document, if it exists, and then print out some stuff.
Here is a code fragement
if (parDoc.getResponses().getCount() > 0)
{
var rspDC:NotesDocumentCollection = parDoc.getResponses()
var rspDoc:NotesDocument = rspDC.getFirstDocument;
if( rspDoc != null){
var s = rspDoc.getItemValueString("isfinal");
}
{
}
}
I get this error at the line starting with var s:
Script interpreter error, line=34, col=32: [TypeError] Error calling method 'getItemValueString(string)' on an object of type 'function [JavaScript Object]'
This is driving me crazy. I am testing for the existence of the doc, but even if I find it, it still gives an error. I have checked that that field exits, tried other fields, etc.
Any help would be greatly appreciated.
Bryan
================
Forget it, I found my error: Needed a () on the rspDC.getFirstDocument!!!!