- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 02:27 AM
Hi Community,
I want to change the value of CI state from abc to xyz selected on the CI list collector field of a catalog item using workflow.
This is what i did so far.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 11:12 PM
Hi,
Use below script:
var CIList = current.variables.server_name_s.toString();
var grCI = new GlideRecord('cmdb_ci_computer');
grCI.addEncodedQuery('sys_idIN' + CIList);
grCI.query();
while (grCI.next()) {
grCI.operational_status = 1;
grCI.update();
}
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 09:45 PM
Please share your variable configuration and script you have written in workflow.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 10:31 PM - edited ‎01-17-2024 11:46 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 11:12 PM
Hi,
Use below script:
var CIList = current.variables.server_name_s.toString();
var grCI = new GlideRecord('cmdb_ci_computer');
grCI.addEncodedQuery('sys_idIN' + CIList);
grCI.query();
while (grCI.next()) {
grCI.operational_status = 1;
grCI.update();
}
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2024 11:52 PM
Yeah i have updated it later and realized that i was not using gliderecord object and the table also i need to use server instead of computer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 09:08 PM
Any update on the request sys id? What request sys id i need to use? Because it will vary request to request.