Before BR condition not working properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 06:20 AM - edited ‎08-28-2023 04:00 AM
Hi Team
Need a suggestion, I have written a before BR (on insert) on cmdb_rel_ci table. And in condition I have given as below. But the condition is not working for Child.support group i.e I want to copy parent support grp to child support group If Child.support group is empty. But after executing its copying the values properly but irrespective of child.class.support have vale or with empty. In Action am just setting Child support group Same as Parent support group.
Need suggestion on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 08:36 PM
Hi Team
Any suggestion on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 09:12 PM - edited ‎08-25-2023 09:21 PM
Hello @priceless ,
Can you please try by addition script and condition in advance tab as follows.
Condition : current.child.support_group==''
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr= new GlideRecord(current.child.sys_class_name);
gr.get(current.child.sys_id);
gr.support_group=current.parent.support_group;
gr.update();
})(current, previous);
Hope that helps!
If it did, please consider marking the reply as the Solution. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 10:30 PM - edited ‎08-25-2023 10:31 PM
Hello @priceless ,
Did you tried with remove Set field from action tab and adding condition to advance tab as mentioned above and if still not working can you please check if there any another BR which updating data?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2023 10:17 PM
Hello
Have you tried with this .walk?
Thanks and Regards
Gaurav Shirsat