Variable value getting cleared out

AkshataP30
Tera Contributor

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. 

4 REPLIES 4

Abbas_5
Tera Sage
Tera Sage

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

I have already checked that field, its false only. The clear value in UI policy is not selected.

Aman Kumar S
Kilo Patron

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/

 

Best Regards
Aman Kumar

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.