- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:30 PM
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.
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 11:53 PM
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?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:39 PM
Hello @AnandKumar1 ,
Make sure your variable name is correct and also try to use current.variables.platform_landing_zone.getDisplayValue()
Let me know is this helps
Also if you find this answer useful please mark it correct
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 10:46 PM
Hi Mohith,
Thanks for your response. I have tried with current.variables.platform_landing_zone.getDisplayValue() as well. Still getting the undefined.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 10:53 PM
can you share variable configuration screenshot?
It's a select box variable right?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 11:36 PM
Hi Ankur,
Thanks for your reply. Yes, this variable is Select Box and have 2 choices.
Thanks.