- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 12:05 AM
Hi Team,
I am trying to get the data from the table, based on two conditions, the below snippet I am trying to pull the records from the table which has "type=x & type=y".
Can anyone please guide me.
<g:evaluate var="jvar_gr" object="true">
var gr = new GlideRecord("table_name");
var gr2=gr.addQuery('type','x');
gr2.addorCondition('type','y');
gr2.addEncodedQuery('beginONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)')
gr2.query();
gr2;
</g:evaluate>
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 05:19 AM
It is addOrCondition, not addorCondition.
You can also string it: gr.addQuery('type','x').addOrCondition('type','y'); and forget the second variable declaration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 05:19 AM
It is addOrCondition, not addorCondition.
You can also string it: gr.addQuery('type','x').addOrCondition('type','y'); and forget the second variable declaration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 05:27 AM
Hey Mike ,
Thanks a lot . its working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 06:00 AM
Can you mark my answer as correct if it helped you solve the issue? Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 12:45 AM
Form the condition on the list view table using table filter. Right click on the filter and copy query.
Now use the copied query in addEncodedQuery and query the data.