addOrCondition() not working with addQuery() function !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2015 10:34 PM
Hello,
I need to write a multiple AND query along with OR conditions for addQuery() function.
When I try to write the following piece of code :-
var gr = new GlideRecord('sys_update_xml');
gr.addQuery('sys_updated_by',a).addOrCondition('sys_updated_by',c).addOrCondition('sys_updated_by',d);
gr.addQuery('target_name',aa).addOrCondition('target_name',ab);
gr.query();
I am writing it as a CLIENT SCRIPT. I also tried it by running it in the WORKFLOW but nothing worked.
Kindly help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2024 12:11 PM
Var grInc = new GlideRecord('incident');
grInc.addQuery('category', 'software').addOrCondition('state' , 'new');
grInc.query();
While(grInc.next())
{
gs. print(grInc.number);
}
gs. Print(grInc. getRowCount());
