Boolean variable in JS

Problem:
Hi,
I want to set the value of a boolean variable through Javascript. I tried various options, like
prez.variable(‘gef_Obj_SchlüsselGrün’, “true”);

In my Project %gef_Obj_SchlüsselGrün% shows me the correct value. But the variable does not really seem to be set to ‘true’. For example if I want to show an object on the condition

if gef_Obj_SchlüsselGrün is equal to True

The object does not show, even though in the slide %gef_Obj_SchlüsselGrün% gives me the value ‘true’.
What am I missing?
Thanks,
Rolf

ActivePresenter version:

OS:

Notes:

Hi Rolf,

Boolean variable should be true or false without the quotes. ("true", "false" or 'true', 'false' are string/text, not boolean).

prez.variable('gef_Obj_SchlüsselGrün', true);

Regards

Thanks, Toan.

I thought I’d tried this option.

I would like to suggest that a comment to that effect is added to the manual on page 260 where it says about setting variables
“Value of variable, can be a string or number.”

Best, Rolf

1 Like

Thank you for the spot, we’ll update the manual.