Reference qualifier on configuration item field not working on incident form

mohammed25
Tera Contributor

After adding the field active to the cmdb_ci table 

i have changed the reference qualifier in incident table for the field "configuration item"

form : 

 

javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

 

to 

 

javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? 'u_active=true' : 'u_active=true^operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

 

and it doesn't work show me all Ci active and not active

link: /now/nav/ui/classic/params/target/sys_dictionary.do%3Fsys_id%3D743b87573321021059ad5d567d5c7b77%26sysparm_view%3Dadvanced%26sysparm_view_forced%3Dtrue

could you help please 

Thanks

 

 

3 REPLIES 3

mohammed25
Tera Contributor

Thank you @pooja_m 
i tried this background script it work fine  but the Reference qualifier always not working  shows me all CIs 

var current = new GlideRecord("incident");
if (current.get("a32fa731836e0a10c137b0a8beaad316")) {
    
    var list = new GlideRecord("cmdb_ci");
    var q = ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1 ? 'u_active=true' : 'u_active=true^operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join();
    gs.info("------------1------- :"+q);
	list.addEncodedQuery(q);
    list.setLimit(20);
    list.query();
    while (list.next()) {
        gs.info(list.getDisplayValue());
    }
}

 

Brad Bowman
Kilo Patron
Kilo Patron

Did you change the Reference qualifier on the Dictionary Override record for the incident table, or directly on the Dictionary Entry for the cmdb_ci field?