- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 08:31 AM
Hi,
I'm trying to update a field in another table using a reference field dot walking based on a condition on the original table.
I have a custom true / false field on our cmdb_ci_computer table
In the software installation table i'm looking for a particular software using display name and if it exists using the installed on field i'm trying to update the true/false field.
i have tried business rules and workflow it looks like it's running but for whatever reason the true/false field will not update.
I've tried this method before and it's worked - does anyone know if there is something stopping the field updating on / from the software installation table?
Cheers,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 08:44 AM
Hi @Sam Motley Share your code which you tried and try below code
if (current.software.display_name == 'YourSoftwareName') {
var computerGr = new GlideRecord('cmdb_ci_computer');
if (computerGr.get(current.installed_on)) {
computerGr.your_true_false_field = true; // or false depending on your logic
computerGr.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 03:22 AM
Hey Brad, i believe it was linked to using the actions tab to update the dot walked field - didn't seem to take it into account - i ended up using the above script cheers