Ankur Bawiskar
Tera Patron

@srihyma 

you can use advanced ref qualifier on the department field/variable

javascript: var query = ''; if(gs.hasRole('itil')) query = 'name=IT'; query;

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

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