1

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

Marc Jonkers
  • 496
  • 1
  • 7
  • 17

1 Answers1

1

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";
Frantisek Kossuth
  • 3,524
  • 2
  • 23
  • 42