Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Servicenow script include query combination addEncodedQuery and addJoinQuery is not working for me

rahulpunde
Tera Contributor

In hardware table there are two different condition I need to work on,
first is substate is "Transit" , and "Training"
second condition is about state "In use" value 1

Combination of these two condition is not working with single addEncodedQuery, so I have written two different queries addEncodedQuery and addJoinQuery. Still second query (state condition line number 5) is not working, it only execute first query (sub state line number 4). So I need help to execute these two queries. Please help.


var assetAggr = new GlideAggregate('hardware');
var queryString = "substatusINtransit,training";
assetAggr.addEncodedQuery(queryString);
assetAggr.addJoinQuery('install_status', 1);

assetAggr.query();
if (assetAggr.next()){
gs.print("Testing count" + assetAggr.getRowCount());
}

0 REPLIES 0