Reputation: 506
My code :
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));
When there's no error , the variable description will get the value of the lookup. When the data of the lookup doesn't return a value , the variable description doesn't get the value "no data", and I get an error message :
Exception occurred calling method NotesSession.evaluate(string) null
Upvotes: 1
Views: 149
Reputation: 3524
Try this:
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";
Upvotes: 1