The CreatorCon Call for Content is officially open! Get started here.

If log in user is itil then populate the groups in which user is present on assignment group fild

Mayur
Tera Contributor
  1. Assign to self
    • Logic - If the logged-in User has an ITIL role add this field above "Please select Assignment Group"
    • Label: "Assign to self?"
    • Type - Yes/No
      • If Yes then filter the "Please select Assignment Group" field to groups that the logged-in user is an active member of.

I have a requirement in that If logged in user have itil role then populate the groups only in which user is present.

How can i achieve that please guide me step by step. 

Mayur_0-1723188662397.png

 

1 REPLY 1

Deborah Brown L
Kilo Sage

Hi @Mayur  ,

1. Write a onChange Client script to show "Please select Assignment Group" variable.

Script:

if((label) == 'Yes' && (g_user.hasRole('itil'){

g_form.setVisible('as_group',true);

}

2. Write a reference qualifier for "Please select Assignment Group" variable.

Reference Qualifier: javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());

 

Thanks

Please mark answer correct/helpful based on impact