Default value on Yes/No variable

Karan31
Tera Contributor

How can we set No on Yes/No variable on variable form page. Since i am using UI policies to control the visibility of the field. I don't want to use client script for this.

9 REPLIES 9

Just checking if this answered or not?

 

-Anurag

Prasant Kumar 1
Kilo Sage

Hi,

Please follow the below screenshot for setting dafault value for Yes/No type variable.

find_real_file.png

 

If I was able to solve your query, please mark my answer correct and helpful.

Thanks & Regards

Prasant Kumar Sahu

PratyushaBodepu
Mega Guru

Hi, 

You can just use the variable configuration to achieve this. Put 'No' in the default value in the variable.

Also, if you don't want 'None' in the dropdown, you can configure using the checkbox 'Include None' accordingly.

Regards

Pratyusha

Anil Shewale
Mega Guru

Hi 

you can write onload client script on form.

example

function onLoad() {

    //Type appropriate comment here, and begin script below

if(g_form.isNewRecord()) {

g_form.setValue("fieldName",false);

}  }

 

If it help mark helpful or correct 

Thanks and regards

Anil

Community Alums
Not applicable

Was having the same issue and had to switch the "Clear the variable value" on my Catalog UI Policy Action to false (when making it invisible). Then had to check "Run scripts" and on "Execute if true" (invisible condition satisfied) added:

g_form.setValue('yes_no_field', 'No', 'No');