sessionAsSigner 评估@DbLookup 错误处理不起作用

sessionAsSigner evaluate @DbLookup error handling not working

我的代码:

var descr = new string('@Unique(@DbLookup("":"";"":"test/demo.nsf";"searchvg";"ARKD')+types[i]+('N";4))'); description = @If(@IsError(sessionAsSigner.evaluate(descr)), "no data", sessionAsSigner.evaluate(descr));

当没有错误时,变量描述将得到查找的值。 当查找的数据没有 return 值时,变量描述没有得到值 "no data",我得到一条错误消息:

Exception occurred calling method NotesSession.evaluate(string) null

试试这个:

var descr = 'tmp := @Unique( @DbLookup( "":""; "":"test/demo.nsf"; "searchvg"; "ARKD' + types[i] + 'N"; 4 )); @If( @IsError( tmp ); ""; tmp )';

description = sessionAsSigner.evaluate(descr);
return description ? description : "No data";