Lock down Variables in Task after its submitted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 05:42 AM
I have catalog items that have Reference fields that create tasks and for example
Change Group name pulls the Name in from Servicenow
When the tasks is created it has that old name but when the name is changed and the 1st tasks
is closed out then the next tasks to a different area to correct in there area gets a tasks and the new name
is in Reference field now.
How do you stop the Reference fields from updating after submitting the REQ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 01:17 PM
Yes this is what I'm trying to do, Need to see old values also. Not sure how to make it happen

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 01:10 AM - edited 02-16-2024 01:13 AM
Hi @Tom Thompson ,
- Please create a new field of type String as shown below in your desired table. In my example I used Incident.
- Now create an OnAfter Business as shown below to copy the assignment group name value as soon as the Incident is created.
Add the below code in your script section & that would store the assignment group name before it got renamed in the field we created.
The final output will look something like this & the value won't change as we are running the BR only on Insert.
(function executeRule(current, previous /*null when async*/) {
current.u_original_assignment_group = current.assignment_group.getDisplayValue();
current.update();
})(current, previous);
Please mark it as "Accept as Solution" and " Helpful. if this solution helped you.
Thanks & Regards,
Madhan Somesh.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 01:14 AM
Hi @Tom Thompson ,
- Please create a new field of type String as shown below in your desired table. In my example I used Incident.
- Now create an OnAfter Business as shown below to copy the assignment group name value as soon as the Incident is created.
Add the below code in your script section & that would store the assignment group name before it got renamed in the field we created.
The final output will look something like this & the value won't change as we are running the BR only on Insert.
(function executeRule(current, previous /*null when async*/) {
current.u_original_assignment_group = current.assignment_group.getDisplayValue();
current.update();
})(current, previous);
Please mark it as "Accept as Solution" and " Helpful. if this solution helped you.
Thanks & Regards,
Madhan Somesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 05:56 AM
you did this for incident and I need it for a catalog tasks where the Field name will be different each time..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024 06:07 AM
Hi @Tom Thompson ,
You can do the same implementation for sc_task as well where you can copy the Assignment group field value from the reference field to the string field we created.
If the field value changes we can add one more if before setting the value saying only if the reference field contains the group value then only proceed with setting the group name value as below.
if(variables.assignment_group)
{
current.u_original_assignment_group = current.assignment_group.getDisplayValue(); //or whatever the field it is
current.update();
}
If still it's not working please provide me with a screenshot of the field/cat item from where the assignment group will be added.
Please mark it as "Accept as Solution" and " Helpful. if this solution helped you.
Thanks & Regards,
Madhan Somesh.