- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2022 07:08 AM
Good morning, we have a catalog item in which we need to use opened by as a variable due to some approvals needed. The problem i'm having is that when we switch the opened by variable on the form, the opened by field on the RITM (see attached) stays as the person who actually opened it. We ran into an issue where I had to cancel and reopen a bunch of tasks, so this caused an issue with notifications and such.
How do i get the opened by on the variable and the opened by on the REQ, RITM, SCTask to match? Any help is appreciated.
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2022 07:25 AM
Hello Linda Grant,
You can use Run script activity in the workflow of the item.This code will help you
For Requested Item :
current.opened_by = current.variables.opened_by;
for Request :
var request = new GlideRecord('sc_request');
request.addQuery('sys_id',current.request);
request.query();
if(request.next())
{
request.opened_by = current.variables.opened_by;
request.update();
}
I hope this will help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2022 07:12 AM
Hi,
If it is for catalog item then you can populate RITM and SC Request field using workflow of Flow running for particular catalog item.
If this is Global change then you can use After insert BR or Flow and copy the variable value into Opened_by field.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2022 07:17 AM
You can put below logic to update opened by on RITM using workflow or BR.
if(current.variables.opened_by !=''){
current.opened_by = current.variables.opened_by.toString();
}
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2022 07:25 AM
Hello Linda Grant,
You can use Run script activity in the workflow of the item.This code will help you
For Requested Item :
current.opened_by = current.variables.opened_by;
for Request :
var request = new GlideRecord('sc_request');
request.addQuery('sys_id',current.request);
request.query();
if(request.next())
{
request.opened_by = current.variables.opened_by;
request.update();
}
I hope this will help.