Help with an advanced reference qualifier

ollyivory
Tera Contributor

Hey

I'm trying to add a dictionary override for incident.assignment_group to restrict the groups shown to the following criteria:

active = true
type = itil
company (of the group) = current company OR company = 'company a'

I've added the following reference qualifier but it isn't restricting the groups to those with a type of itil

javascript:'active=' + 'true’+’^’”typeLIKE' + '1cb8ab9bff500200158bffffffffff62’+’^’”company=' + current.companyOR'company=' + '46cce73d47909650d96b8d76736d43eb'


Can anyone suggest what I've done wrong?

If I run a query on the group table, copy the query and paste into the reference qualifier it works, this issue seems to be having to use javascript to handle to dot walking to the company field value.

Thanks in advance

 

1 ACCEPTED SOLUTION

JenniferRah
Mega Sage

It looks like you have some double quotes in there that shouldn't be and it's being broken up more than necessary. Try this:

javascript: 'active=true^typeLIKE1cb8ab9bff500200158bffffffffff62^company=' + current.company + '^ORcompany=46cce73d47909650d96b8d76736d43eb';

 

View solution in original post

4 REPLIES 4

JenniferRah
Mega Sage

It looks like you have some double quotes in there that shouldn't be and it's being broken up more than necessary. Try this:

javascript: 'active=true^typeLIKE1cb8ab9bff500200158bffffffffff62^company=' + current.company + '^ORcompany=46cce73d47909650d96b8d76736d43eb';

 

That's amazing, thank you so much..... I'd looked at it so much I'd gone code blind!

Ankur Bawiskar
Tera Patron
Tera Patron

@ollyivory 

your ref qualifier contains some weird character

try the ref qualifier shared by @JenniferRah and it should work

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

Nishant8
Giga Sage

Hello @ollyivory,

editing my comment as i misread the company name. yes you can follow what Jennifer shared or as below.

problem seems to be with query formation

javascript:'active=true^typeLIKE1cb8ab9bff500200158bffffffffff62^company=46cce73d47909650d96b8d76736d43eb^ORcompany=' + current.company

 

Regards,

Nishant