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.

Is my reference qualifier syntax is correct

Community Alums
Not applicable

Hi Everyone, 

I have written a reference qualifier for a field under a catalog item

javascript:('mod=' + current.variables.mod + '^u_type=' + current.variables.u_type.getDisplayValue() + '^active=true');

see, for the field "u_type" I am not getting the value, since it is a reference field we are using getDisplayValue.

Trying the same thing in background script it is working...

 

Thanks
Utsav

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

If the u_type field on the referenced table and the u_type Catalog Item variable are both reference fields to the same table, get rid of the .getDisplayValue() as both will match on sys_id.  If the u_type field is a string, try current.variables.u_type.u_name - or whatever the field name is that is displayed for this table.