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

Glide record location table and print all locations whose latitude are not empty and greater than 50

Helan
Tera Contributor
 
1 ACCEPTED SOLUTION

J Siva
Kilo Patron

Hi @Helan 
Try the below script.

var locationGr = new GlideRecord('cmn_location');
locationGr.addNotNullQuery('latitude');
locationGr.addQuery('latitude', '>', 50);
locationGr.query();
while (locationGr.next()) {
  gs.info(locationGr.getValue('name'));
}
 

Regards,
Siva

View solution in original post

5 REPLIES 5

SumanthDosapati
Mega Sage

@Helan 

Below script should work :

var loc = new GlideRecord("cmn_location");
loc.addEncodedQuery("latitude>50");
loc.query();
while (loc.next()){
    gs.info(loc.getDisplayValue());
}

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth