Copy data from 1 RITM into another RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
Looking for assistance on whether or not this is possible to accomplish. I'll provide the requirements and the scenario as outlined. Trying to rack my brain around this and so far not seeing how it's possible. I've looked around the community and saw a couple of similar options others have completed, however after reviewing the requirements, I'm not sure if this points me in the right direction.
Scenario: We have an onboarding process where the HR platform sends an email on the new hire information, to which we have it ingested and parsed to a catalog item with it's respective general sctasks that can be completed immediately. Not an issue has been working for some time. The next step is to ask the Hiring manager for further details for their new hire that would come from a separate RITM (catalog item). At this point, we now have 2 tickets submitted: 1 RITM - onboarding email, 1 RITM manager extra details.
Requirements: To build a process that copies the data from the manager extra details RITM to the initial onboarding RITM.
For the onboarding, very standard variables that I capture based on the email from HR and for the Manager extra details form, this has many more variables to capture. The difficulty I'm having is to fully understand how this is possible cleanly and in a more practical sense.
Options I looked/thought about:
- I looked into capturing the variables from the manager form and insert all into a multi-line text field of the onboarding ticket
- though possible, it's not a clean display for the team to fulfill
- another option was to recreate the variables from the manager form to the onboarding form and copy and/or map the variables between the RITM's. Here I had to understand how to cross reference between the 2 tickets before I can simply copy the data/content.
- Also I advised on changing the process use an order guide as it is best suited for these types of scenarios, however as you may experience sometimes the client trumps what may be best practice or best solution.
Just getting your thoughts or possible links to other members who may have built something similar to this to put me on the right direction. I'm still fighting to keep it simple and use the order guide, however I'm open to other suggestions if this is in any way remotely possible.
Looking forward to any response and your assistance.
JO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hey @Joel O
Follow this :
A practical solution is to add a reference variable on the Manager Extra Details catalog item that references the original onboarding RITM.
configuration:
Variable name: parent_onboarding_ritm
Type: Reference
Reference table: sc_req_item
This allows the second request to explicitly reference the original onboarding RITM.
In some implementations, this reference can also be auto-populated through a notification link, Flow Designer, or email logic, so the manager does not need to manually select the record.
Copying variable values between the RITMs
Once the relationship exists, you can trigger a Business Rule or Flow Designer action when the Manager Extra Details RITM is submitted.
Business Rule concept (After Insert on sc_req_item for the Manager Details catalog item):
(function executeRule(current, previous) {
if (!current.variables.parent_onboarding_ritm)
return;
var onboarding = new GlideRecord('sc_req_item');
if (!onboarding.get(current.variables.parent_onboarding_ritm))
return;
var varGR = new GlideRecord('sc_item_option_mtom');
varGR.addQuery('request_item', current.sys_id);
varGR.query();
while (varGR.next()) {
var targetVar = new GlideRecord('sc_item_option_mtom');
targetVar.initialize();
targetVar.request_item = onboarding.sys_id;
targetVar.sc_item_option = varGR.sc_item_option;
targetVar.value = varGR.value;
targetVar.insert();
}
})(current, previous);
*************************************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
hey @Joel O
Hope you are doing well.
Did my previous reply answer your question?
If it was helpful, please mark it as correct ✓ and close the thread . This will help other readers find the solution more easily.
Regards,
Vaishali Singh
