Dynamic choices in multiple choice variable type

Brijmohan
Tera Contributor

Hi, is there any way to set dynamic choice in multiple choice variable type. I have tried below client script that is working for select box type but not for multiple choice type. 

function onLoad() {

    var userEmail = g_user.email;

    var splitEmail = userEmail.split('@');
    var userName = splitEmail[0];
    var domain = splitEmail[1];

    var newEmail = userName + '1@' + domain;

	var label1 = "No thanks. I will keep " + userEmail;
	
    g_form.removeOption('v_email_address', 'keep');
    g_form.addOption('v_email_address', 'keep', label1);

    g_form.removeOption('v_email_address', 'new');
    g_form.addOption('v_email_address', 'new', newEmail);

}

 

Thanks in advanced!

Brijmohan

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Brijmohan 

not possible with multi select variable type.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader