How to make the assignment group mandatory

Pooja Khatri
Tera Contributor

Hello All ,

I have a requirement , where  I need to make the assignment group mandatory field and also when the assigned_to value changes the assignment group should become empty and it should become mandatory again.

Can anyone help me how I can configure this on the client side.

Thank You in advance !!

 

1 ACCEPTED SOLUTION

Hi,

is the field on form or not?

please share client script screenshot

if that doesn't work then use this normal client script on sc_req_item table

function onLoad(){

	var itemName = g_form.getDisplayBox('cat_item').value;
	if(itemName == 'Your Item 1'){
		g_form.setMandatory('assignment_group', true);
	}
}

Regards
Ankur

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

View solution in original post

20 REPLIES 20

Community Alums
Not applicable

Hi,

You can make the field mandatory by using the setMandatory().

And for clearing value you can use clearValues()

And for checking that the assigned_to value changes you can use onChange client script for assigned_to.

 

Regards,

Priyam Kaushik

assignment group and assigned to are fields of the RITM .. with the onchange client script I need to select the variable on which it should be applied .. and the variable is not on the Form .. I need to do these changes on the RITM

Sooraj Singh3
Kilo Expert

Hi Pooja,

With OOB reference qualifier an user will be able to choose assigned_to user only from currently selected assignment_group, so in case you need a new assigned_to user first you have to select a corresponding assignment_group

Or you are not using this configuration ?

Amit Gujarathi
Giga Sage
Giga Sage

Hi Pooja,

 

Its quite simple using client script

Please look at the below screenshot for the implementation

find_real_file.png

 

RRegars,

Amit Gujarathi


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi