How to have no default value in choice list

Thereza Van der
Tera Contributor

Morning everyone

 

I have a drop down list but want it to be empty by default. Is that possible? Initially I had 'None' then I changed it to 'Please select' but the problem is, the users are able to log a complaint/compliment with those options as well and I don't want that.

 

In the screenshot below you can submit every if 'please select' is the option.

TherezaVander_0-1729677646171.png

In the screenshot below it can be logged even if 'select sub-category' is the option. 

TherezaVander_1-1729677756859.png

Is there a way I can prevent users from logging if they haven't selected a choice?

 

 

Regards

Thereza

 

 

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @Thereza Van der,

 

This is absolutely possible.

The easiest way to implement this is on the Variable (Question) itself, configure the 'Type Specification' tab and tick the 'Include none' checkbox.

If the variable and question is mandatory, the system will not allow you to have the 'None' value selected. This is handled by ServiceNow OOB (Out Of Box) for you.

 

Check the below screen shot of a test variable from my PDI for you to follow.

 

Screenshot 2024-10-23 at 11.22.08.png

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.



Thanks, Robbie

 

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

Any time you create a Question Choice, that becomes a valid option, unless you create an onSubmit Catalog Client script to check for that value and not allow the submit.  The straight-forward way to handle this is to just check the 'Include none' box on the Type Specifications tab of the variable, and make sure the Default value is empty

BradBowman_0-1729678974357.png

 

Robbie
Kilo Patron
Kilo Patron

Hi @Thereza Van der,

 

This is absolutely possible.

The easiest way to implement this is on the Variable (Question) itself, configure the 'Type Specification' tab and tick the 'Include none' checkbox.

If the variable and question is mandatory, the system will not allow you to have the 'None' value selected. This is handled by ServiceNow OOB (Out Of Box) for you.

 

Check the below screen shot of a test variable from my PDI for you to follow.

 

Screenshot 2024-10-23 at 11.22.08.png

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.



Thanks, Robbie

 

Rohit  Singh
Mega Sage

Hi There,

 

You can include default value as none. Got to the variable "Would you like to give a compliment or complaint" in that Type Specification you can select include none. Also you would have to remove the option as "Please select" since it's not a valid choice option. By including default value as "None" your variable will still act as mandatory until and unless the choice value is selected. 

 

Please make the solution helpful if I make it clear.