Adding Multiple reference qualifier

Appu
Tera Guru

Hi 

I wanted to add a filter condition to a variable in catalog item but there is already an advanced reference qualifier present.
now I want to add this filter condition operational_status=1 along with the present condition.

javascript: current.variables.v_BLine2 == '' ? '': 'u_group='+ current.variables.v_BLine2;(existing condition)

I tried this way but didnt get the result
javascript: current.variables.v_BLine2 == '' ? '': 'u_group='+ current.variables.v_BLine2+"^operational_status=1";

Any suggestions..?

1 ACCEPTED SOLUTION

Hi,

is your existing ref qualifier working fine?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

HI 

The existing Ref Qualifier was of no use so i removed and set from advanced to simple.

 

Thankyou

asifnoor
Kilo Patron

Hi,

You cannot use ternery operator in the condition itself. declare a varialbe query and assign the value based on your ternery operator. Try like this.

javascript: var query; if(current.variables.vBLine2 == "your_value") { query = 'u_group='+ current.variables.v_BLine2; } else {query = 'u_group='+ current.variables.v_BLine2+"^operational_status=1";} query;

Mark the comment as correct/helpful if this has helped to solve the problem.