addOrCondition()

  • Use the addOrCondition() method to add a ned condition to a select statement using OR
  • Works with addQuery()
var myObj = new GlideRecord('change_request');
var q1 = myObj.addQuery('category', '=', 'Hardware');
q1.addOrCondition('priority', '!=', 1);

Use an object variable and addQuery() to add the first condition and addOrCondition() for the second condition.

results matching ""

    No results matching ""