Reusable Choices - Did You Know
foreign Chuck here again with another time saving tip on the servicenow platform before that a quick reminder to like this video if you find it useful and subscribe to our servicenow developer channel so you don't miss out on any other handy tips okay I suspect the majority of us have created a choice field or two in our past and if not I'm sure we'll be doing that at some point in the future one thing that's likely to show up on our list of requirements is multiple choice lists with the same values we might not think too much about adding the same options to several Choice Fields until someone asks us to add a new option to all of them did you know we can save a lot of time by referencing one choice field from another that means we only have to build and maintain the choices in one place let's take a look here we have a choice field with a few options now we get a requirement to add a choice field with the same options on the same form or perhaps another form on another table it doesn't matter the process is the same rather than entering these four options again we're going to go to the new field and tell it to get its choices from the original one let's do this first in app engine Studio our requirement is to add another field called additional storage with the same options as the base storage field so we'll go to the panel on the left and create a new field we'll call it additional storage and use the type choice next we'll place it on the form right next to base storage now we'll go to the properties on the right and in the choices section we'll click edit notice this option at the top right that says use choices from another field we'll pick the table and select the base storage field and we'll show it as a drop down without the none option we'll click apply and save our form changes back on the form we'll refresh and there's our new field but what's this we have a none option and we specifically said not to it's not a bug it means we forgot to set the default value on our new additional storage field so let's put that in we do this because additional storage may have a different default than base storage once we apply and save the new Choice field looks great now when someone asked to put a new choice on both lists we can modify the base storage field using one of several methods we'll do ours through app engine Studio and both lists are updated and for those who may not have app engine Studio yet here's another way to add it from the dictionary entry after the additional storage field has been added to the form we'll right-click the field label and choose configure dictionary next we'll go down to the related links and click Advanced View under the choice list specification section we'll use the choice table field to pick our source table and choice field to pick base storage this time we won't forget to set the default value or the same thing will happen with the none option that we saw before and again changing the options on base storage is reflected in additional storage just to note that this option is different than a dependent Choice field with a dependent Choice field the selection of one field drives the different options you see on the dependent field a classic example of a dependent Choice field is the category and subcategory on the incident form the subcategory field is dependent on the category field and when we change the categories we see the different options on the subcategory field that's a dependent Choice field don't forget if you've got a great idea of something you've discovered on the platform share it as a video blog or social media with the hashtag servicenowdyk and be part of the community that's all for now but I'll be back with another servicenow Dyk soon thanks for watching [Music]
https://www.youtube.com/watch?v=2-6lZKD0zXU