how to write background script that will give you list of user whose location is empty

kusumgautam
Tera Contributor
 
1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

You can create the query from the user list view and then use in a script

 

For ex

 

var user = new GlideRecord('sys_user');
user.addEncodedQuery('locationISEMPTY');
user.query();

while (user.next())
{
   gs.info('Location is empty for '+user.user_name);
}

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

5 REPLIES 5

Thank you Sanjiv !!