How to glide record location table and print all locations whose latitude are not empty and greater

Helan
Tera Contributor

How to glide record location table and print all locations whose latitude are not empty and greater than 50 

1 ACCEPTED SOLUTION

SAI VENKATESH
Tera Sage
Tera Sage

Hi @Helan 

 

You can use the below script:

var locvalue=new GlideRecord('cmn_location');
locvalue.addEncodedQuery('latitudeISNOTEMPTY^latitude>50');
locvalue.query();
while(locvalue.next()){
	gs.print("Locations are"+locvalue.name);
}

You can try it in background script and you can change it based upon your need

 

Thanks and Regards

Sai Venkatesh

View solution in original post

3 REPLIES 3

SAI VENKATESH
Tera Sage
Tera Sage

Hi @Helan 

 

You can use the below script:

var locvalue=new GlideRecord('cmn_location');
locvalue.addEncodedQuery('latitudeISNOTEMPTY^latitude>50');
locvalue.query();
while(locvalue.next()){
	gs.print("Locations are"+locvalue.name);
}

You can try it in background script and you can change it based upon your need

 

Thanks and Regards

Sai Venkatesh

Thank you, @SAI VENKATESH @! This worked for me

Hi @Helan 

 

can you mark the solution as correct so that it can be helpful for others.

 

 

Thanks and Regards 

Sai venkatesh