Script to check location value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 06:05 AM
Hello Comunity,
There is a need to check for location value mapped??
So what is happening, for certain user's location is showing empty(actually it is not hidden, display value is not mapped)but some dummy value is mapped in backend.Not displaying the value.
Can anyone help me.how we can check using script for these scenario?.I would need to implement this script in scheduled job.Please help here for implementation of condition.
Thanks,
Sajal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 07:02 AM
sorry, don't get your point. Please provide a screenshot to help us understand you better.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 07:58 PM
Hello Mike,
Is there a way if we can check if the location mapped in user profile is different or not present in our location table??
Could you please help me with filter condition on user profile list view?
Thanks,
Sajal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 10:06 PM
you can write script -1) Get user location from sys_user table for the user
like userLocation=user.location;
2) Fire Query on Location table and compare user's location
var Loc=new GlideRecord('ur_location_table');//Use your location table name instead of ur_location_table'
Loc.addQuery('location_field', userLocation);////Use your location_field name from location table
Loc.query();
var locRecord='';
if(Loc.next()){
locRecord=Loc.getValue('location_field');
}
return