Reference qualifier - javascript help

Ahmet1
Tera Expert

Hi, I'm trying to do this on a catalog item field called "Request Item" to have an advanced reference qualifier on a reference field to only show results matching the following:

 

User name variable on catalog item: Contact

Variable on reference qualifier directed table: Opened By

 

I need the field "request item" to only show results where the contact field on the catalog item matches the record on table sc_req_item opened by and the record is active.

I'm trying this advanced reference qualifier:

javascript:'opened_by=' + current.variables.contact; 

and 

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

neither are working

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Ahmet1 ,

 

Try the following reference qualifier.

 

 

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

 

Replace : with :

 

Make sure that your Contact variable is of reference type and referring to sys_user table.

 

AnveshKumarM_0-1687528298374.png

 

If you are using a text field for Contact and entering User ID (user_name) in that field, try the following one.

javascript:'active=true^opened_by.user_name='+current.variables.contact;

 

AnveshKumarM_1-1687528582145.png

 

Thanks,
Anvesh

View solution in original post

3 REPLIES 3

AnveshKumar M
Tera Sage
Tera Sage

Hi @Ahmet1 ,

 

Try the following reference qualifier.

 

 

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

 

Replace : with :

 

Make sure that your Contact variable is of reference type and referring to sys_user table.

 

AnveshKumarM_0-1687528298374.png

 

If you are using a text field for Contact and entering User ID (user_name) in that field, try the following one.

javascript:'active=true^opened_by.user_name='+current.variables.contact;

 

AnveshKumarM_1-1687528582145.png

 

Thanks,
Anvesh

Thanks Anvesh, how do I also add a OR clause? for example opened by = contact OR requested for = contact , this is specified by ^NQ but not sure how to add this in with two javascript OR's

Hi @Ahmet1 

You can try this one.

javascript:'opened_by=' + current.variables.contact + '^active=true^NQactive=true^requested_for=' + current.variables.contact;

 

Thanks,
Anvesh