How can i make multiple choice variable by default empty.

balaji_charapal
Kilo Guru

Hi Team,

How can i make multiple choice variable by default empty(not selected any thing)

add_remove.PNG

Regards,

Balaji Chara

26 REPLIES 26

Harish KM
Kilo Patron
Kilo Patron

then what is the point of creating it?


Regards
Harish

On page load I want unselected, later depends on requirement users can select.



REgards,


BAlaji chara


Balaji,



The multiple choice variable type is a "one of any" type, meaning that it has to be one of the available options. You can have any number of choices (multiple choices) but one of them has to be true. I think the functionality you are looking for is either the checkbox or the Yes/No. Both can default to false, or No, and can be changed to true/Yes.



Regards,


Chad


Thank you Chadlocwood.



I am exactly looking for multiple choices functionality only, but on form load i wanted to be unselected all the choices.


if it is not possible i will go with Check boxs and i need to add on change client script not allow select more than one option.



Regards,


Balaji Chara


I have not explored the solution below (using Type Specifications), however we use an onLoad Catalog Client Script for the variable set whenever we use Radio Buttons. It blanks it out in certain circumstances. The script would also allow you to put some logic behind it if you wanted (if the person is from a certain group, it defaults to a certain type):


(these are all of the "Multiple Choice" type - I know, the ".checked" makes it seem like it's a checkbox)



function onLoad() {


      var a_m_d = g_form.getControl('add_modify_delete');


      a_m_d.checked = false;



      var copy_or_specify = g_form.getControl('copy_or_specify');


      copy_or_specify.checked = false;


     


      var ol = g_form.getControl('req_entry_ol_levels');


      ol.checked = false;


     


      var cl = g_form.getControl('req_entry_cl_levels');


      cl.checked = false;      


}