- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 11:03 AM
So I am trying to return a list of incidents that are not updated by a member of my group. If I type 'Update by - is not - MDULU^sys_updated_by!=ZJBIEW, into the filter it will exclude any incidents not updated by those two users. However if I put 'javascript:notMyGroupUpdate' in and have it return the exact same string, it does not work. Any ideas why?
Basically when I type it in ServiceNow, press run, and then expand the filter I have two updated by - is not lines. One for MDULU and one for ZJBIEW When I return the sting I only have one updated by - is not line, and it is looking for an updated value of 'MDULU^sys_updated_by!=ZJBIEW'.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 01:50 PM
Hi Matt,
Its simply a matter of how the filter is being processed, the 'javascript' is being processed at a different time than the raw text resulting in a different filter being applied. Here is a quick solution that avoids use of encoded queries in the filter:
Instead of:
javascript:MDULU^sys_updated_by!=ZJBIEW (which is the equivalent of the notMyGroupUpdate)
Try:
javascript:['MDULU','ZJBIEW']
Using an array in the javascript will create the correct filter. Once you confirm that this yields the desired result, just change notMyGroupUpdate function to return an array of username strings and your filter will work as desired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 01:50 PM
Hi Matt,
Its simply a matter of how the filter is being processed, the 'javascript' is being processed at a different time than the raw text resulting in a different filter being applied. Here is a quick solution that avoids use of encoded queries in the filter:
Instead of:
javascript:MDULU^sys_updated_by!=ZJBIEW (which is the equivalent of the notMyGroupUpdate)
Try:
javascript:['MDULU','ZJBIEW']
Using an array in the javascript will create the correct filter. Once you confirm that this yields the desired result, just change notMyGroupUpdate function to return an array of username strings and your filter will work as desired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 02:14 PM
Thanks, sometimes the easy answer is always correct. That was my first thought, but when I tried typing it in manually it did not work. That will teach me to make things harder then they need to be. Thanks for the help!