Hide an option from a choice list for ITIL users

akumarsst
Tera Contributor

Hi,

Is it possible to hide an option from a choice list for ITIL users?

Lets say there are 4 options in a choice field and i want to hide the 3rd option for ITIL users, would that be achievable?

3 REPLIES 3

Henrik Jutterst
Tera Guru

Sure. This example works fine.

Create a new Client Script that runs onLoad

 

function onLoad() {
	//who to display it for - admin
	var isAdmin = g_user.hasRole('admin');
	
	//what field to show/hide from - contact_type
	var contactType = g_form.getValue('contact_type');
	
	//hide value for non values
	if (!isAdmin && (contactType == 'integration')){
		g_form.removeOption('contact_type', 'integration');
	}
}