In the payload one variable value is resulting with undefined.

AnandKumar1
Tera Expert

Hi Team,

I have an SR that once catalog submitted after approval the payload will be sent to azure and fulfillment process will continue the flow. 

 

Based on the selecting the subscription selecting the payload differs. One variable (select box) which that alone sending as undefined in the logs.

 

AnandKumar1_0-1682396488793.png

 

Below my script:

 

body1='{"InfoSeC":"'+current.variables.info_security_subs.getDisplayValue()+'","requestor_object_instance_id":"'+current.variables.application_name_subs.asset_tag+'","case":"Subscription","requestNumber":"'+new1+'","Connected VNET region":"'+current.variables.connected_vnet_region_subs_aks+'","Connected VNET Size":"'+current.variables.connected_vnet_size_subs_aks+'","Platform landing zone":"'+current.variables.platform_landing_zone.toString()+'"}';

 

Below are my sys_logs:

{"InfoSeC":"Open","requestor_object_instance_id":"300333","case":"Subscription","requestNumber":"36b82813871e65d07013cbb5cebb3593","Connected VNET region":"Azure West Europe","Connected VNET Size":"21","Platform landing zone":"undefined"}

 

The only difference in that payload is rest all from variable set and last one ("platform landing zone") is retriving from variable on the catalog. Please assist what I am missing here.

 

Thanks.

1 ACCEPTED SOLUTION

@AnandKumar1 

are you sure there is no space in the variable name at the end?

Did you try to hard-code the RITM sysId and check if you can get the variable value in background script?

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

View solution in original post

6 REPLIES 6

@AnandKumar1 

are you sure there is no space in the variable name at the end?

Did you try to hard-code the RITM sysId and check if you can get the variable value in background script?

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

AnandKumar1
Tera Expert

Thank You Ankur and Mohit, I have recreated that variable again now it got worked. I hope that is a glitch. I am keeping that old variable in active false. I can check with vendor also today about this issue 🙂