Variable value getting cleared out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 09:58 AM
We have a API to update the variables from azure. Once the RITM is approved some variables are updated. Once we work on task and close it those variables are wiped out. Its not always but its intermittet. Please help me understand the reason behind it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2024 10:04 PM
Hello @AkshataP30,
Please refer to the below link:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0748094
Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:35 AM
I have already checked that field, its false only. The clear value in UI policy is not selected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 12:39 AM
Hi @AkshataP30
Can you check which HTTPS method you are using to update the values, is it put or patch, if its patch it will just update the mentioned values, but if you are using put, it will set the variables as empty if value is not being passed explicitly in the payload.
Refer to below article to understand how put vs patch works:
https://www.geeksforgeeks.org/difference-between-put-and-patch-request/
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 06:35 PM
its a PATCH method, there are 2 levels of approval and then automatically through API the variables are updated. But when the Sctask is marked as closed complete, it will erase those data.