The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Display Choices In Reference Type Variable based on Select Box Options

Hemant Ch
Tera Expert

Hello 

We have Select Box Variable with 5 Options and Reference Type variable referencing to a Table 

 

Suppose If Option A is selected then we want to show 5 Choices in Reference Type Variable ,How to Show Choices in Reference Type Variable based on Choice selected in Select Box 

 

Have gone through some links but the problem is we don't have any flags in Reference table linked to Select Box Options to GlideRecord or to use reference qualifier 

 

 

1 ACCEPTED SOLUTION

@Hemant Ch 

you need to use advanced ref qualifier like this

Example: if user selects option as A then show records containing name ABC

If user selects option as B then show records containing name DEF

Ensure you give the choice value for the options.

javascript: var query; if(current.variables.variable1 == 'A') query = 'nameLIKEABC'; else if(current.variables.variable1 == 'B') query = 'nameLIKEDEF'; query;

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

View solution in original post

5 REPLIES 5

Mike_R
Kilo Patron
Kilo Patron

for your reference field, you'll need to create and advanced reference qualifier and add your logic to that script.

Hemant Ch
Tera Expert

Hello @Mike_R @Ankur Bawiskar 

Any Help on the Script part ?

@Hemant Ch 

you need to use advanced ref qualifier like this

Example: if user selects option as A then show records containing name ABC

If user selects option as B then show records containing name DEF

Ensure you give the choice value for the options.

javascript: var query; if(current.variables.variable1 == 'A') query = 'nameLIKEABC'; else if(current.variables.variable1 == 'B') query = 'nameLIKEDEF'; query;

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