How can i make Yes/No datatype by default the answer as no in Assessment metrics

chantigadulocal
Kilo Contributor

Hello i need to make yes/no data type by default answer to no in assessment metrics.

and the field should be invisible to questionnaire responded unless the field right above is completed

1 ACCEPTED SOLUTION

divya mishra
Tera Guru

Client Script onLoad :



function onLoad() {


    //Type appropriate comment here, and begin script below


if(g_form.isNewRecord()) {


g_form.setValue("fieldName",false);


}  


}


View solution in original post

8 REPLIES 8

divya mishra
Tera Guru

In order to set a default value :



1. you can write an on load client script under condition g_form.isNewRecord()


2. g_form.setValue("fieldName",value);



Let me know if this was helpful


can you share the code so that it will be helpfull


divya mishra
Tera Guru

Client Script onLoad :



function onLoad() {


    //Type appropriate comment here, and begin script below


if(g_form.isNewRecord()) {


g_form.setValue("fieldName",false);


}  


}


anusha9
Kilo Contributor

In Default value, if you don't find drop-down Yes, No.

 

Just type "No" in the default value so that the field value will be set to know from the choices Yes/No