- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2016 03:38 PM
Hi folks!
We have a business need to display records based on physical locations (cmn_locations) in addition to the Assigned To/Group fields. For example, a Facility Engineer will need to see Work Orders assigned to themselves along with all other Work Orders related to the location(s) they cover.
I am trying to find a way to leverage the User Location Coverage (sys_user_covers_location) table to return the locations and then filter a report that way. Is anyone aware of a way of leveraging a JavaScript query in the report builder for locations? What I was thinking is I could use JavaScript to return the location sys_ids, similar to a breadcrumb query, ex:
location=1b6b156013335e005c45b53a6144b080^ORlocation=d647f9aa13b0a24024d67e276144b04c^ORlocation=1154e9e013335e005c45b53a6144b064
Or is there a way to leverage the UI to select the Locations Covered table (screenshot below)?
Thanks in advance!
David
Solved! Go to Solution.
- Labels:
-
Dashboard
-
Performance Analytics
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2016 04:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2016 07:00 PM
You are again right David. for some reason it wasn't available for me as well. but, I have just got it there by running a background script.
var gr= new GlideRecord('sys_report')
gr.get('6ba85161df23210068c37a0d3df263e2');
gr.filter='templateISNOTEMPTY^NQlocationINjavascript:test()^EQ^GROUPBYtemplate^TRENDBYactivity_due,year';
gr.update()
There might be a better way, but above worked for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2016 07:31 PM
Thank you sir! That is exactly what I needed (curious to know why the 'IN' operator is not there OOB).
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2017 08:16 PM