
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 05:57 PM - edited 02-27-2025 06:00 PM
Greetings,
I'm slowly learning but I seem to be at an impass on a BR Script I need to pull value from one form and copy it over to another form where the names are the same.
Criteria:
Backup Testing form
When a person creates a backup testing record they enter the name of the application, some details and then the Backup Execution Date. I need the date to be transferred to the Application record where the application name is the same as the app name on the backup test record.
For example:
Backup Test Record on the Backup Test Table is completed for Active Directory
User enters the date it was done
the BR script then will look at the cmdb_ci_appl table for an app with the "Active Directory" name and update the Backup Tested Date field on the app record to match the Backup Test Record.
i have attempted to write the following script which seems to be updating the field but on records OTHER than the Active Directory record. Ugh
Hoping someone may be able to push me in the correct direction and teach me along the way 🙂
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:31 PM
@adrianh Please see if the following works.
(function executeRule(current, previous /*null when async*/) {
//Purpose - Upd CMDB Appl Rec "Backup Tested Date" when Backup Exec Record "Backup Exec Date" created
//Find records on CMDB Application where Appl Name same as Backup Record Application Name
var name = new GlideRecord('cmdb_ci_appl');
//where App.Name (cmdb_ci_appl.name) = Backup Exececution App Name (u_application_name)
name.addQuery("name", current.getValue('u_backup_name'));
name.setLimit(100); //Comment out after testing
name.query();
while (name.next()) {
//For match, Set Appl BU Tst Date (u_backup_tested_date) = BU Exec Rec BU Tst Date (u_backup_tested_date)
name.setValue('u_backup_tested_date', current.getValue('u_backup_tested_date'));
//Update the record.
name.update();
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 03:44 PM
Following up. I wanted to thank each of you for offering your help.
@Sandeep Rajput Sandeep got the Accepted Solution as he showed me there was a flaw in my script. Once I sub'd out the cmdb_ci_appl.name with name, my script started working. So thank you Sandeep for that.
@Bidduam Bidduam your suggestion helped me out on another part of the project which I needed to do and BR Script was not working so I used a couple flows to achieve the task successfully
@Ankur Bawiskar your suggestion also helped me understand what the script was doing rather than just blindly typing out JS.
At the end of the day you each helped me out with task and learning. So a huge thanks 🙂 Gotta love a community who is always willing to help each other out and teach while at it.