How to retrieve a variable value from a RITM and Populate on a the same field in a new request, Thanks so much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 10:26 PM
Hi, Please help on how to retrieve a variable value from a RITM and Populate on a the same field in a new request, Thanks so much.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 10:34 PM
Hi there,
You could achieve this within a Flow or Workflow which runs on the RITM. Reading the variable (current.variable.your_variable) and performing a GlideRecord update on the REQ.
Other option could be an after insert Business Rule on the RITM, which reading the variable and performing a GlideRecord update on the REQ.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 10:35 PM
Hi,
for accessing any variable value of RITM the syntax is below
if you are using this in workflow of RITM then current object refers to GlideRecord object of sc_req_item
current.variables.<variableName>
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 10:49 PM
Hi,
Check this
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 11:00 PM
Thanks both, Mark and Ankur,
I am not an expert in coding,But I have tried and learnt a bit.
I need to retrieve a variable value from a closed RITM and populate that value on the same field when a new request is logged, Any help please, Thanks
Any example script will be a great help.
My Item name of 'Bonus_time off'
Users submit the form, it gets approved and closed.
One of the variables on that (form)item is 'any time off taken already'
When same user requests again, they need to fill in the hours taken already.
The requirement is to extract
the variable value, from the same user's previous request for that catalog item
and then populate the same variable in new request.
Is it possible?
Please advise. Thanks again.