Auto populate assignment group based on assigned to user

Sowjanya Panuga
Tera Contributor

Using client script how can I Auto-populate the assignment group based on the assigned user?

9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sowjanya Panuga 

 

Thats look easy but not,

 

- Assigned to user can be member of many group

- If it is one then it is easy and straight forward 

but if more than 1 , then it wil just populate in drop down.

and then as per OOTB, if user change the assigned to again, loop will loop again. 

 

What is use case for same.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ramz
Mega Sage

Hi @Sowjanya Panuga ,

Instead of auto populating you can add reference qualifier to your assignment group to show groups the assigned to is part of.Write a script include where it says if assigned to is not empty then query the assignment group he/she is part of and if assigned to is empty query all the assignment groups

 

Please mark my answer correct/helpful if it resolved your query

AnimeshP_96
Tera Guru

hello @Sowjanya Panuga

 

can you eloborate more as an example so that i could guide you easy.

for an instance

if(g_form.getValue('assignment_group')=="hardware")

{

g_form.setValue('assigned_to',"sys_id of the user who you want to set");

 

}

let me know other than this you want it for the query.
 


Please accept the solution /mark this response as correct or helpful if it assisted you with your question.




Regards,
Animesh

Using client script I want to auto-populate the assignment group based on the assigned to user in which the user belongs to the group.