Add default value in Lookup select box

ServiceNow SA
Kilo Guru

Hi Team,

In my catalog, we want to always show a "Not in List" option in lookup select box (Var1) as the first option.

Now that Var1 is dependent on Var2(another lookup select box) .The dependency is set through script include and reference qualifier.

I am trying to achieve through onChange client script of Var2 and using g_form.addOption but it is not working.

Any idea? 

9 REPLIES 9

Devyani_6
Mega Guru

Hi,

Go through below thread, this will helps you.

How to populate Lookup Select Box based on value of another Lookup Select Box?

Respond back, if having further queries.

Mark Correct/Helpful, if this helps you.

Regards,

Devyani

ServiceNow SA
Kilo Guru

Hi Devyani,

 

i have already done that part. My question is how to always show a default option which is doesn't depend on the dependency?

For eg :

if Var 2 = Fruits

Var 1 options = Not in List, apple, banana

if var 2 = animal

Var 1 options = Not in List , lion, cat

"Not in List" should always be visible. How can i achieve this?

Hi,

There is a default value field available in the variable table, using that you can set default value. 

You can share your script and respond back, if having more queries.

Mark Correct/Helpful, if this helps you.

Regards,

Devyani

 

Default value will set the value .. I need a default value in the options.