ServiceNow developer tips on how to configure choice lists that a customer admin can maintain rather than needing a developer to change. See slides for git repository link to demo app
3. Use case
• Gives customers the ability to update their own choices
• Saves developer having to continually change choice options
4. How
1. Create an extensible custom table as a base for choice tables
containing the default configuration for choice tables
2. Create a new choice table extended from the base choice
table
3. Create a reference field instead of a choice field
4. Configure the dictionary entry on the reference field
to turn it into a dropdown list
5. 1. Create an extensible custom table
• Contains the default configuration that all choice tables will inherit
• Fields:
• Label (String 40)
• Value (String 40)
• Description (String 200)
• Active (True/False)
• ACLs:
• Read – App user
• Create – App admin
• Write – App admin, with restrictions to prevent changing labels for
auditing purposes
• Delete – Nobody (Auditing purposes again as deleted choices will end
up as blank references)
6. 2. Create a choice table
• Create a new choice table using an appropriate name that is
extended from the base choice table
• Custom apps force you to create default ACLs linked to a role
which end up masking the ACL configuration from the parent
table
• Delete the ACLs automatically created with the new table or
modify them if this table will not follow the default configuration
set up in the base choice table
7. 3. Create a reference field
• Used instead of a choice field
• Reference is the choice table
• Reference qualifier: active = true
8. 4. Configure the dictionary entry
• Change the default choice option from: "-- None --"
to: "Dropdown without -- None --"
9. Added bonuses!
• Choices can be managed through import sets
• Choice type can be changed back to "-- None --"
so users can search when choice lists are large
• Reference field "i" can be used to see long descriptions of
choice labels