Create multiple "RITM's" under the "REQ" based on the quantity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 04:03 AM
Hi everyone, is it possible for the "REQ's" to have multiple "RITM's" under it based on the "quantity" inputed by the user?
For example:
If the quantity is 2 the REQ should have 2 RITM on the related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 04:20 AM
That's not what the quantity means in ServiceNow. What's the point in having multiple RITMs under same REQ with same information?
if you still require this then check this
Create multiple RITM under single request depending upon list collector values through workflow
How to create multiple Ritms under one request for different catalog item?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 04:49 AM
If you are using BR then I shared solution for something similar earlier, you can enhance it for quantity rather than MRVS
Multiple RITM's for single request based on the MRVS selection
another solution shared here
Request Items from one Multi Row Variable Set
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 05:29 AM
Here's a breakdown of how you can achieve this, along with options for minimizing code:
Understanding the Challenge
The standard behavior in ServiceNow is that a single REQ creates a single RITM, which then potentially creates multiple SCTASKs (Catalog Tasks) for fulfillment. Your requirement introduces the need for dynamic RITM creation based on quantity.
No-Code Part (Configuration):
Catalog Item Setup: Ensure your catalog item has a "Quantity" variable (of type Integer).
Workflow Design: Create a workflow for your catalog item. The workflow should handle the standard process of order fulfillment (approvals, tasks, etc.).
Go to "Flow Designer" within your Experience Work Studio application.
Create a new Action Script on Flow UI interface
How it achieves dynamic creation based on quantity:
The for loop script is the key. It iterates a number of times determined by the inputs.quantity value. Each time the loop runs, it creates a new RITM record. So, if the user enters a quantity of 4:
The initial RITM is created (triggering the Flow).
The loop runs 3 times (4 - 1 = 3).
Three additional RITMs are created and linked to the same REQ.
request (Reference to sc_request) - The REQ record.
catalog_item (Reference to sc_cat_item) - The catalog item.
quantity (Integer) - The quantity entered by the user.