var grDict=new GlideRecord('sys_dictionary');
grDict.addQuery('name', 'cmdb_ci_computer');
grDict.addQuery('element','cd_rom');
grDict.query();
gs.print(grDict.getRowCount());//--column exists, output is 1
var grDict=new GlideRecord('sys_dictionary');
grDict.addQuery('name', 'cmdb_ci_computer');
grDict.addQuery('element','cd_romZ');
grDict.query();
gs.print(grDict.getRowCount());//--column does not exist, output is 0
Comments
Post a Comment