Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Help with an Advanced Reference Qualifier on catalog item variable

jlaue
Mega Sage

Hello - 

I have a functioning advanced reference qualifier on a Catalog Item variable, however I need to add a few more conditions to it.  I am pulling a different variable on the catalog item within the qualifier along with only pulling active records.  This is on the sys_user table.

Here is what I have that is properly working:

javascript:'location='+current.variables.location+'^active=true';

I need to also exclude a specific location and also exclude any users without a location value.  

I tried this, but it is not working:

javascript:'location='+current.variables.location+'^active=true^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY';

I have also tried:

javascript:'location='+current.variables.location+'^active=true'+'^location!=bd9abf38dbeec45086313e04399619ea'+'^locationISNOTEMPTY';

Hoping someone can help with how I should structure this.

Thanks!

1 ACCEPTED SOLUTION

Can you try this: javascript:(current.variables.location ? 'location=' + current.variables.location + '^active=true' : 'active=true ^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY');

View solution in original post

7 REPLIES 7

When the location variable has a value, I want this reference to sys_user to only show only active user records in that location.

 

When the location variable is empty, I want this reference to sys_user to show all active users where the user's location value is not empty and also filter out location bd9abf38dbeec45086313e04399619ea

 

 

Can you try this: javascript:(current.variables.location ? 'location=' + current.variables.location + '^active=true' : 'active=true ^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY');

That worked perfectly!  Thank you so much for your help!!