Tag Governance - Tag Key & Value Policy script failing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 08:23 AM
I am trying to create a Tag Key & Value Policy that looks at the value for the key "altci" and checks against the cmdb_ci_service_discovered table to see if that value matches an existing record on the cmdb_ci_service_discovered table
I am not sure where my script is failing and could use some assistance.
Script:
var values = [];
var gr = new GlideRecord('cmdb_ci_service_discovered');
gr.query();
while (gr.next()) {
var v = gr.getValue("u_alt_ci_id");
v.toString();
values.push(v);
gs.info('Retrieved u_alt_ci_id: ' + v);
}
tagValues = values;
u_alt_ci_id is a custom string field on the cmdb_ci_service_discovered table
When I run the audit I get "Expected value '' for tag key 'altci'." Even when I know that the u_alt_ci_id does exists in our table.
0 REPLIES 0