Can you import /export a filter so It can be shared between users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 07:40 PM
I have a series of 5 filters that I need to give to about 20 different users. Is there a way to share or import a filter so the other users can use them. I just do not want to recreate all the filters on each users. I have tried to have them recreated on several users but it was hard to manually recreate each filter on each user account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 03:31 AM
Hello Patrick,
If you expand the filter conditions on any list there is an option to save the filter. You can choose to save for just you, everyone or for a specific group.
If you have a subset of users to share the filter with I'd recommend creating a group for these users and then save the filters for that group.
Regards,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 03:37 AM
F.Y.I. The filters will then be available from the hamburger icon next to the table name for the users.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 03:33 AM
You can create your custom filter and later use it on user table.
Regards,
Vineetha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2016 04:10 AM
Hi Patrick
The filters are stored in a table under System Definition -> Filters.
To copy a filter to another user, you simply open that specific filter, change the user and then right click the header and select insert and say. You repeat this for every user.
That could take some time if you have many filters for many users. Alternativley you could create a background script (or Fix Scripts - ServiceNow Wiki ) which does it for you
var filters = ["001e7d8e6f71c2806a1a08c6eb3ee42f","02ea3d05db3f1200a6f7ffa9bf96193c","037a59436f1d5640ad54b1b3dd3ee4d8"]; //Array of filters to copy by their id
var users = ["abc","efg","xxx"];// Array of user to copy to by their user_name
for (var i = 0; i < filters.length; i++) {
var gr = new GlideRecord('sys_filter');
gr.get(filters[i]);
var newFilter = new GlideRecord('sys_filter');
for (x = 0; x < users.length; x++) {
newFilter.initialize();
var user = new GlideRecord('sys_user');
user.get('user_name',users[x];
newFilter.user = user.sys_id;
newFilter.title = gr.title;
newFilter.table = gr.table;
newFilter.filter = gr.filter;
newFilter.insert();
}
}
The script has not been tested