Notifications

25 views

Description

In a client script, when having an IF condition on a boolean field, something like the following:

 

var bp = g_form.getValue('active');
if(bp == true){
...
}
else if(bp == false)
{
...
}

It will probably not work, since the g_form.getValue() function is returning the value as a Sting.

Resolution

Instead, you will have to write the condition as follows:

 

var bp = g_form.getValue('active');
if(bp == 'true'){
...
}
else if(bp == 'false')
{
...
}

Article Information

Last Updated:2019-10-30 09:25:18
Published:2019-10-30