reference qualifier in a variable in a single row set, to reference another variable

aanchalsriv
Kilo Contributor

i need to set a reference qualifier on a vendor variable based on another reference variable, along with the condition that its active, how can i do that, both the variables are in different single row variable sets.

I am currently using the following reference qualifier
javascript: "u_type=Vendor^u_active=true^u_country="+current.variables.owning_branch_name.u_country.getDisplayValue();
help!!!!

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@aanchalsriv 

both variables are in different single row variable sets should not be an issue

this should work provided

1) you are using the correct u_type field and correct value Vendor to compare

2) you are comparing correct u_country field on that table and it's string type and the display value of country matches

javascript: "u_type=Vendor^u_active=true^u_country="+current.variables.owning_branch_name.u_country.getDisplayValue();

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

GopikaP
Mega Sage

Hi @aanchalsriv , yes it should work - owning_branch_name is the other single row variables' internal name, right? The syntax will be:

javascript: "u_type=Vendor^u_active=true^u_country="+current.variables.other_single_row_variable_internal_name.variable_name.getDisplayValue();
javascript: "u_type=Vendor^u_active=true^u_country="+current.variables.owning_branch_name.u_country.getDisplayValue();