Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

g_form.clearValue not working for select box variable

khareakshay
Tera Contributor

I have a simple on change catalog client script as below, here entity_name is reference type variable,  changes_entity_appointment_ownership is select box variable and  appointments is MRVS and except for entity_name no other field gets cleared. I know appointments is MRVS and that can be the reason for it but How to resolve this for select box type variable?  

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }

    g_form.clearValue('entity_name');
    g_form.clearValue('changes_entity_appointment_ownership');
    g_form.clearValue('appointments');

}
1 REPLY 1

Nishant8
Tera Sage

Hello @khareakshay, Could you please verify whether you have None check box selected in the Select box variable? I believe, without this checkbox value will not be cleared; instead, it will be set to default value whatever was set when form loaded.

With None, system creates blank value and clear works.

 

Regards,

Nishant