- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 06:13 AM
Hello all,
I recently updated a Catalog form, by replacing a field with a Variable Set Reference field.
Unfortunately, I did not update the Flow before moving into PRD (sigh!)
Now, the RITM have the field, but the Task does not.
Although I have corrected the issue, but I have about 33 Tasks that are missing that field.
How can I remediate them?
Thank you.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 09:40 AM
Hi @Hola Ola ,
These are set during run time and don't think to dig in here to update,
Why don't you put a worknote for these 33 Tasks with updated Variable values using fix script???
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 06:18 AM
Hello @Hola Ola ,
To resolve the issue with the 33 SCTasks that are missing a field due to the replacement with a Variable Set Reference, you can follow these approaches:
1. Write a Script to Update the SCTasks
- Use a Background Script to update the missing field in the SCTasks. Since the related RITM records contain the correct data, you can retrieve the values from the RITMs and apply them to the corresponding SCTask records.
Here's an example of how the script could look:
var scTask = new GlideRecord('sc_task');
scTask.addEncodedQuery('state!=3^field_name=NULL'); // Adjust query for the relevant tasks
scTask.query();
while(scTask.next()) {
var ritm = new GlideRecord('sc_req_item');
ritm.get(scTask.request_item); // Assuming 'request_item' links SCTask to RITM
if (ritm) {
scTask.field_name = ritm.field_name; // Copy field value from RITM
scTask.update();
}
}
- Replace field_name with the actual field or variable name.
- Adjust the query and conditions as needed to target the appropriate tasks.
2. Manual Updates (If Applicable)
- For a manageable number of records, you could update the missing field values manually via the UI, especially if there are not many tasks to modify.
3. Using an Import Set
- Export the affected SCTask records using Data Export.
- Update the missing fields in the exported file, using the RITMs as a reference.
- Reimport the corrected file via an Import Set to update the SCTask records.
4. Review the Flow Configuration
- Ensure that the flow (or workflow) is correctly referencing the Variable Set so that future tasks are created with the correct field values.
By applying one or more of these steps, you should be able to update the missing field values in the SCTasks.
I’m not an expert, but I did my best to share all the knowledge I have to assist you. If you found my response helpful, I would appreciate it if you could mark it as helpful or like it 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 05:11 AM
ChatGPT didn't understand the question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 09:40 AM
Hi @Hola Ola ,
These are set during run time and don't think to dig in here to update,
Why don't you put a worknote for these 33 Tasks with updated Variable values using fix script???
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 05:10 AM
Agree with @Hemanth M1 - "what variables are displaying for this RITM's sc_tasks is buried deep in *I THINK* flow context information. I doubt you could modify it at that level, and even if you could its so risky I wouldn't do it for 33 tickets.
Better to write a script and dump to worknotes.