In ssjs I try to change the state of a checkbox. I tried :
doc.replaceItemValue( 'picWeb', "true" );
which doesn't seem to change anything (checkbox doesn't change to checked)
I also tried :
doc.replaceItemValue( 'picWeb', true );
which throws an error
( [TypeError] Exception occurred calling method NotesDocument.replaceItemValue(string, boolean)
null)
If I understand it well :
you can't change a checkbox (boolean) with replaceItemValue
, but how do I change it then ?
Is it possible with ssjs or java or ...
Define in checkbox which string relates to checked value and which to unchecked value with the properties
checkedValue
anduncheckedValue
:You can set the value then with
This is a complete example to demonstrate how to set a checkbox value in SSJS:
The value is set in document as string