Advanced reference qualifier

Adam_Michies
Tera Contributor

Hi, I have a catalog item and in one of the variables i am trying to filter the records that are shown to only show those that either have the same company as the u_company variable in the catalog item or that have the company with the following sys_id : 232e52426f2e1240ca2ed6b2be3ee498

i wrote an advanced reference qualifier and i can't seem to find a way to put both conditions at once, do you know how i could do that ?

 

my advanced reference qualifier currently looks like this but i have tried other things :

javascript: "u_company=" + current.variables.u_company || "u_company=232e52426f2e1240ca2ed6b2be3ee498";

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Adam_Michies 

try this

javascript: "u_company=" + current.variables.u_company + "^ORu_company=232e52426f2e1240ca2ed6b2be3ee498";

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

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Adam_Michies 

try this

javascript: "u_company=" + current.variables.u_company + "^ORu_company=232e52426f2e1240ca2ed6b2be3ee498";

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

i tried it and it didn't work is there a mistake somewhere ?

Adam_Michies_0-1698068519322.png

 

edit: i changed it to this and it worked

Adam_Michies_0-1698068780132.png

 

 

@Adam_Michies 

is u_company a correct variable name?

also is u_company a correct field on that Software model table which holds company?

If yes then my script will work

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

it actually worked i just wrote javascript: instead of javascript followed by a colon