Get choice values for integration usage

Shusovit Dutta
Tera Contributor

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

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Shusovit Dutta 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader