Tag Governance - Tag Key & Value Policy script failing

Shannon16
Tera Contributor

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;
Shannon16_0-1738167536906.png

 

 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.  

 

Shannon16_1-1738167653553.png

 

0 REPLIES 0