- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 07:18 AM
Hello Everyone,
I have a specific need that I have not been able to find a solution for. We have an Order Guide for New User Onboarding. We have it set so our hiring managers fill out the Order Guide from the Service Portal, entering the user's name, department, software/hardware requirements, etc. When they press submit, it creates several RITMs that all have the variables from the Order Guide cascaded to them. Before the RITM workflows kick off however, the request as a whole must be approved by one of our HR team members.
We would like the ability to have the HR team member who reviews the request be able to edit any incorrect information (e.g. incorrectly spelled name, wrong department, etc.); however, I haven't been able to find an easy way for the HR team to fix mistakes without going into each RITM individually and changing the value. This can be a problem, as each onboarding request has on average about 7 or 8 RITMs.
Is there a way that I could give the HR team the ability to edit the values for the Request in one spot so that it propagates those values to all the RITMs?
Thank you
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 04:41 PM
After the order guide is submitted from the front-end, it ceases to exist...leaving only separate catalog items under a single request record. The variables on each of these items are completely independent and don't have any connection to each other. In order to do what you're asking, you would need to have a single, master item that the HR rep would go to in order to validate and edit the variables on. Once they did that, you would need to have a 'before' 'update' business rule that would query for any associated request items under the same request and update a corresponding variable if it existed. The business rule script might look something like this...
// Query for request items under the same request
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', current.request);
ritm.query();
while (ritm.next()) {
// Update the matching variables in each item
ritm.variables.MY_VAR_NAME_1 = current.variables.MY_VAR_NAME_1;
ritm.variables.MY_VAR_NAME_2 = current.variables.MY_VAR_NAME_2;
ritm.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 04:41 PM
After the order guide is submitted from the front-end, it ceases to exist...leaving only separate catalog items under a single request record. The variables on each of these items are completely independent and don't have any connection to each other. In order to do what you're asking, you would need to have a single, master item that the HR rep would go to in order to validate and edit the variables on. Once they did that, you would need to have a 'before' 'update' business rule that would query for any associated request items under the same request and update a corresponding variable if it existed. The business rule script might look something like this...
// Query for request items under the same request
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', current.request);
ritm.query();
while (ritm.next()) {
// Update the matching variables in each item
ritm.variables.MY_VAR_NAME_1 = current.variables.MY_VAR_NAME_1;
ritm.variables.MY_VAR_NAME_2 = current.variables.MY_VAR_NAME_2;
ritm.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 06:50 AM
Thanks so much! This was exactly what I needed; it worked like a charm!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 06:55 AM
Awesome! Thanks for letting me know.