- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 03:19 PM
I have a requirement to update our exiting New Application CI Request.
Our current workflow creates the new Application CI record, using details gathered from the request.
We also have an SCTask for the application owner and in that description, we are providing the URL to access this new application CI to complete the application CI with all the mandatory data.
My UPDATEs that I am making to this catalog item are:
1. AFTER the record has been created, I need update the RITM and populate the CI field on the RITM with the name of the new application CI
2. After this is done, I need to also then update the SCTask that gets created, and set the CI field on the SCTask to be the CI that was created.
*** the goal of these 2 new requirements is to keep the catalog owner from having to click on the URL to access the CI to complete it.
Because these new application CI's are being created as "non-operational" status, I can't just use the data pill to populate the CI field, because of reference qualifiers on that field and one of those requires it to be "operational".
I have been advised that I should be able to force it in this case with code, and that I should be able to do this in my flow via toggle scripting on the "configuration item field". I have tried with no luck so far.
If I use inline scripting, I do know that the result is: fd_data._20__create_record.record.sys_id
Thanks in advance for any support anyone can offer.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 07:54 AM
Hey Kathy! It took me a sec but I got it to work. Here's what I did:
- Created a new action called Set Configuration Item
- I created two inputs on the action step:
- requested_item (reference to sc_req_item)
- configuration_item (reference to cmdb_ci)
- Then I created a script step with two input variables that match the action inputs
- Then I scripted the following code to make the record update:
(function execute(inputs, outputs) {
var requested_item = new GlideRecord('sc_req_item');
requested_item.addQuery('sys_id', inputs.requested_item.sys_id);
requested_item.query();
requested_item.next();
requested_item.configuration_item = inputs.configuration_item.sys_id;
requested_item.cmdb_ci = inputs.configuration_item.sys_id;
requested_item.update();
})(inputs, outputs);
- Then I hit test and it successfully updated the field despite the reference qualifier
Once you have that action working, you can add it to your flow to set the value. Then rinse and repeat for the catalog tasks.
I attached an XML export of the an update set with the action definition I created and tested so you have a working example to compare to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 09:05 AM - edited 06-26-2025 01:00 PM
So, we've all heard the expression, "Can't see the forest for the trees".
Well, I was looking straight through the trees and SO never saw a forest.
The same stepped worked to set the CI field on the Catalog tasks that worked on the update RITM.
What I missed, surely because I had spent so much time making this harder than it was, is looking at the very next action that updated the Catalog task (apparently I had tried an option on that action that wasn't working). When I had the right script on the step before it, the incorrect step was overriding it.
I updated the step that was overriding mine and all is good.
My takeaway, DON'T overthink or over complicate. Sometimes it really is an easy solution.
What final worked for both options ( the CI field on Ritm and SC Task) was as simple as toggle scripting and then basically inline scripting:
- return fd_data.20_create_application_record.record.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 05:09 PM
Hi @kdelbridge,
You won't be able to force a field/variable reference value even through scripting if there is a reference qualifier that prevents it from being available to select. Reference qualifier will invalidate the entry.
You would have to create the CI in operational status to add to RITM.
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 04:35 AM
Thanks for your reply. Manager insists that there should be a way to force the value via code as it should override the search qualifier.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 07:54 AM
Hey Kathy! It took me a sec but I got it to work. Here's what I did:
- Created a new action called Set Configuration Item
- I created two inputs on the action step:
- requested_item (reference to sc_req_item)
- configuration_item (reference to cmdb_ci)
- Then I created a script step with two input variables that match the action inputs
- Then I scripted the following code to make the record update:
(function execute(inputs, outputs) {
var requested_item = new GlideRecord('sc_req_item');
requested_item.addQuery('sys_id', inputs.requested_item.sys_id);
requested_item.query();
requested_item.next();
requested_item.configuration_item = inputs.configuration_item.sys_id;
requested_item.cmdb_ci = inputs.configuration_item.sys_id;
requested_item.update();
})(inputs, outputs);
- Then I hit test and it successfully updated the field despite the reference qualifier
Once you have that action working, you can add it to your flow to set the value. Then rinse and repeat for the catalog tasks.
I attached an XML export of the an update set with the action definition I created and tested so you have a working example to compare to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 08:00 AM
Thanks so much Justin! You must have been replying while I was. I give this a whirl as well, specifically since what worked on my update ritm action is not working on the catalog tasks creation.