Get choice values for integration usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 01:38 AM
I am working on a integration where some status choices are coming in as part of inbound JSON.
For e.g: status 1, status 2 & status 3.
Now using these three statuses I would like to take different actions via script include.
I do not want to hardcode the statuses in script include and should call the statuses and do something.
Apart from storing these values in system properties, where else I can store these values so that I can call it instead of hard coding it.
Script include:
if("status1" ) {do something} // need to call the status1 and not hardcode it here
if("status2" ) {do something}// need to call the status2 and not hardcode it here
if("status3" ) {do something}// need to call the status3 and not hardcode it here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 01:45 AM
system property is the ideal place to store them to avoid any script change going forward.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader