Update changed “Requested for” variable value on RITM with using “Reference” variable type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 09:19 AM
Introduction
In ServiceNow, managing and updating variables on a Requested Item (RITM) can be essential for ensuring accurate request handling. One common challenge is changing the auto-populated "Requested For" variable value while submitting the request. However, the updated value may not reflect on the RITM as expected. In this article, we will explore a solution to address this issue by leveraging the "Reference" variable type.
Note: While you can achieve this requirement by directly using the "requestor for" variable type, there are scenarios where using the "Reference" variable type becomes necessary. For example, if you restrict the visibility of a catalog item to specific groups, using "requestor for" as the variable type may result in errors. In such cases, you should consider using the "Reference" type.
Problem Statement
The problem involves modifying the auto populated "Requested For" variable value during request submission and ensuring that the RITM record reflects this change accurately.
Solution Overview
To solve this challenge, we need to understand the underlying data structure in ServiceNow. Three main tables play a crucial role in mapping catalog variables to requested items:
1) Variable Ownership [sc_item_option_mtom]: This table contains two primary fields:
- Parent Item: Stores the RITM number in the reference field from the Requested Items [sc_req_item] table.
- Dependent Item: Stores the sys_id in the reference field from the Options [sc_item_option] table
2) Options [sc_item_option]: This table stores variables and the values entered by users. By mapping this table with the Variable Ownership table using the "Dependent Item" field, we gain access to all user-entered values for specific questions.
3) Requested Item [sc_req_item]: This table is familiar and will be used to map with the "Parent Item" field from the Variable Ownership table. This mapping allows access to all fields in the Requested Item table.
Solution Steps
To implement the solution and update the "Requested For" variable value on RITM, follow these steps:
Step 1: Create a sub-flow and within the sub-flow, perform the following actions:
Action 1: Lookup RITM record
Action 2: Retrieve the variable ownership records related to the identified RITM.
Action 3: For each variable ownership record(sc_item_option_mtom) related to the RITM, proceed with the following actions:
Action 4: For getting the variable value, lookup the Options records(sc_item_options) related to Variable ownership dependent value.
Action 5: Check if the question pertains to the Requested for and has a value.
Action 6: If the question is related to the requestor and has a value, update the RITM record with the "Requested on Behalf Of" information.
Step 2: Create a flow for the catalog item. In the first action of this flow, invoke the previously created sub-flow.
By following these steps, you can effectively update the "Requested For" variable value on the RITM using the "Reference" variable type.
Thank you.
- 1,102 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 09:34 AM
Helpful. Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:44 AM
Good one!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 10:58 PM
Helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 06:33 AM
Thanks for sharing the information.Helpful👍