We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Getting user location from user table via glide record

Sneha39
Mega Guru

Hi ,

I have to call script include after getting user location from user table via glide.

Kindly help me with script .

PS : I have to call assignment lookup script include which will assign a group based on user location taken from the user table

Thanks in advance

5 REPLIES 5

Not applicable

Hi Sneha,



Good Day



Please find the updated script below for your reference :



var user = new GlideRecord('sys_user');


user.get('2892312d4f1f3200da95e9628110c79e');


var assignmentGroup = new assignment lookup(); /*calls your script include*/


var result = yourFunctionName(user.location);/*calls the specific function by passing the location of the user in the parameter*/



Hope it will helps you out!



PS: Hit like, Helpful or Correct



Thanks,


Priyanka R