The CreatorCon Call for Content is officially open! Get started here.

set reference qualifier through script for Lookup

sncrnd
Kilo Contributor

I am working on Eureka and looking help to set reference qualifier through script for Lookup Select box catalog variable. I have two variables:

  1. Application   - Select box
  2. Operation — Lookup select box

 

I put reference qual = "u_application_unit=" + current.variables.application for variable "Operation".

 

But this works only on load not on change of variable Application   variable. reference current.variables in the reference qualifier and have the field refresh when another variable changes

Can anyone help me how to do this.

 

Thanks

Chandan !

30 REPLIES 30

alexaria
Tera Contributor

this article worked for me:
How to modify Reference Qualifiers with Catalog Client Scripts – ServiceNow – ServiceNow Think (word...

 

 

and this is the onChange client script:

 

var resetFilter = 'active=true^nameISNOTEMPTY^emailISNOTEMPTY^EQ';
var dynamicFilter = g_form.getValue('your other text var holding encoded query').toString().trim();
var gg = g_list.get('your ref var name'); // GlideList2 object
gg.setQuery(newValue == '' ? resetFilter : dynamicFilter);