I have two computed fields and want update them. It works great in the browser, but the IBM Notes client gives an error.
Here is the code:
var Admin = @DbColumn("", "GoreAdmins", 1);
var AdminBackup = @DbColumn("", "GoreAdmins", 2);
if (Admin && typeof Admin == "string") Admin = new Array(Admin);
if (AdminBackup && typeof AdminBackup == "string") AdminBackup = new Array(AdminBackup);
if (document1.isNewNote()) {
document1.setValue("Admin", Admin);
document1.setValue("AdminBackup", AdminBackup);
};
I get the error on this line:document1.setValue("Admin", Admin);
The first parameter for @DbColumn()
and @DbLookup
needs to be the database, easiest done with @DbName()
. The method of passing a blank string won't work in XPiNC. It's standard for Notes Client development, works for XPages on a browser but is bad practice for this very reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With