Chuck Tomasi
Tera Patron

Look at using an advanced reference qualifier (a script of your choosing.) Pass the function your type, it can then return the proper filter string (either the above or nothing.)



javascript:myConditionCheck().changeType(current.type);



var myConditionCheck = Class.create();


myConditionCheck.prototype = {


      initialize: function() {


      },


    changeType : function(changeType) {


            if (changeType == 'Emergency')


                  return 'sys_class_name=incident^ORsys_class_name=problem^EQ';



            return '';


    },



      type: 'myConditionCheck'


};



http://wiki.servicenow.com/index.php?title=Reference_Qualifiers


View solution in original post