Assign to reference qual , need members of particular needs to populate

Arun_Manoj
Mega Sage

Hi ,

 

Assigned to field in a  form needs populate the users from particular assignment group members.

this assigned to from task and override to the new table. Please provide reference qualifier to get the group members in that .

 

@Ankur Bawiskar 

1 ACCEPTED SOLUTION

@Arun_Manoj 

Then create dictionary override for your table for that field.

Ensure "Override reference qualifier" = True

Paste the script I gave in Reference qualifier field

AnkurBawiskar_0-1754901357901.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

15 REPLIES 15

based on role get the users ,like that based on group?

 

RaghavSh
Kilo Patron

Create a hidden assignment group field (reference), set the default value of that field to the group you are interested in and then set the assigned to dependent on hidden assignment group field.


Raghav
MVP 2023

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

so there is no group field and directly assigned_to field

Then you can use advanced ref qualifier in that to show members from particular group

Something like this

javascript: var query;
var arr = [];
var gr = new GlideRecord("sys_user_grmember");
gr.addQuery("group.name", "Group Name"); // give here group name
gr.query();
while (gr.next()) {
    arr.push(gr.getValue('user'));
}
query = 'sys_idIN' + arr.toString();
query;

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

the script not working @Ankur Bawiskar 

@Ankur Bawiskar , this field override from task