logo

NJP

Share The Wealth: How To Use Performance Analytics Interactive Filters in ServiceNow (Demo)

Import · Mar 23, 2020 · video

so what I'm gonna do is I'm going to create a couple demo reports a standard add a box filter and I'll create a small custom filter as well so first I'll just go ahead and make a pie chart we're gonna want table mmm we're just gonna do it on the problem table then select pie chart that's better and then I'll just Joe created these last year all right then we can go ahead and save that report then I'll also make another report for list like that same table and I'll just do all for this then I don't want it's grouped by anything then I'll just hit them starting to stay then we can go ahead and create some interactive filters so you just go to the interactive filter table and create new we can do a reference we can say I only want a single input we want the reference table so I'm going to do business services I'm gonna hit save and then if you get onto the related list you can select which table you want it to apply to in that field to apply to you know what I'm also going to do is I'm going to create a custom filters so for that we're gonna have to create a dynamic content block so you've got some jelly tugs in here you can use jelly you don't necessarily need to use jelly so for this example I'm actually not even gonna really use any jelly at all so for what I'm gonna do is I'm going to create just a simple filter with two buttons to show how the filtering could work so variable filter then we're gonna create a new dashboard message handler and then this is where you'd give it a unique name I'll close the script tag and then we can just make some simple input buttons first group is missing at sea ah thank you it's an on click we'll have it be that removed function so [Music] and then we'll do another and put four just showing the ones that are assigned to the current use are using it I will use the publish filter method and then this is where you add in your table name and then your filter that you want hopefully I typed this all correctly we can go ahead and submit and so now I'll take you back to the dashboard and now we can go ahead and start adding the things we just created so first we can go and add the two reports that I just created that's it up here and then you can go and did that reference field that I created mmm this is all you know shape and size and move to wherever you'd like and then for the custom one that I create it's gonna be under content block and hold it test well at least the buttons are rendering correctly so it's a good sign so now that we have these on your dashboard you're going to want to set your reports to be able to follow them so you can go while you have the plus icon opened you can modify everything on the dashboard so you'd go into your gear and have follow interactive filters selected and then you can also select show when following filter so this will show if that report is following a filter or not and then for this pie chart since it's one of the types of reports that can act as an interactive filter you hop that option as act as an interactive filter you can also have it follow other interactive filters as well so first we can take a look at this reference field that we created so say own they want to see the business service problems with business surface as blackberry so now I can see this pie chart was filtered to only show the three back blackberry problems as well as the lists you're only showing the problems with the business service being blackberry you can go back and see all and then we can also hit only mine so now there's only one that is assigned to me currently the system admin and if we hit remove filter it's going to hide that and then now that this pie chart is also could potentially act as an interactive filter you could select that slice so it's going to show only the ones that were people saw enterprise now it's going to show filter this list to only show that single record and then also right here this icon this filter so that means it's following a filter so that's that option to show when filtering if you didn't have that selected that filter isn't going to show anymore so now I also have a dashboard showing the different standard out of box filters that you can create just to see how you could kind of take a look at them so this one is a cascading filter so you'd have to select the manager first before you can see what apply which groups to only show so if you only wanted to see the ones where the manager is this person and then it's only gonna limit the groups to show which once he's a part of then you can see now the assignment group is showing his network versus gone he's the manager of two groups those were filtering on the new state so we can go ahead and apply so here we go now we have the different states because showing for all versus the specific one that you wanted and it had the defaults set as as new so that's one of the things with the defaults you going to ought to be careful with that so just you know if if you selected this the next time you're going to come back it's going to be on this state choice filter already so you're gonna want to come in here and hit that reset filter it does bring it back to that default value that we had specified in that filter but everything else if it didn't have a default filter it's going to reset and then that reset filter is the one I was talking about where that only applies to the standard out of box filters it's not going to reset your custom ones so you'd have to save refresh your page or create your own button to clear all of the custom ones that you have created so you also have this group by filter so this is the one where you can filter on different fields but only show it in a single widget so if you want incident opened in the last three months and the priority is planning you can apply that it's not as intuitive to potentially know which options you're going for but you can do it so you have also opened by so this is going to be a deep field it is limited the add a box one so you can't select specific deniz or ranges of days but you get the the general options of ranges that you can select so in the last six months you had these and then you can filter on that one doesn't work these are all new but um so if you had the category and this helped an inquiry you can go ahead and apply that this is also a multi-select so it's going to be an either/or so if the category is help and inquiry or hardware it's going to show all of the records match apparently there's not many different categories well but I also have the new state so network database helping inquiry so it's a it's an or within itself and then same thing just another field where you can select the different auction so each one between them are are tans but within themselves if there are multi select they're gonna be ORS and I also created a bunch of custom filters that you don't have available so this was just another similar one the two assigned or two only me or all tasks you also have a string field so I have it set to look at the short description so I can hit search so now it's gonna have anything that contains tests so I made this one to just be basically be a wild-card search for the input and they all saw the clear that will filter that out we also have some list fields that you don't have the ability to create standard out of box so I created different types so this one is showing a list filled with values with just users starting with F and this is I believe looking at the work notes list field so we can go ahead and see the ones where Fred is in that list field this same thing is going to be an or situation so show all the records where Fred or Frankie are in so as you can see work notes list is dynamic to the two cysts undie users so I have that clear button or if there's no checkboxes it all selected it clears that filter I also have same thing list field but instead of it being checkboxes it's kind of your standard list field where this is looking at the watch list so we're going to select a few different people there's probably not a lot and a lot but this so right now it's checking for all the records where the watch list contains either Abel nubra ham and you can see same thing watch list has any of these values in itself and then this date custom field filter that I didn't create it I found this on the community I did modify it slightly but this gives you your more standard options to filter on the date so if I want ones that were opened today I can actually specify that or if I want between certain days so we can go ahead and select between you know for the last month and it's going to show that the was created within this date range so gives you the more more options for date filtering and so actually I'll also show you some of the code behind these so you can get as complex or simple as you need to be so this one is actually using some jelly to to go through and build it so right now you have your just standard glide record query and pushing all of the user records into an array so this is querying for all the users that start with the letter F for their name and it's pushing all of the objects into an array and then below we have it looping through that array and creating checkboxes for each of those options in the array and then you have different scripts to set the different filters for whatever options that you selected and then you can put some styling in there as well and then so this was again with the dynamic content but the one that I found on the community that date one that actually used a widget and a macro so an interesting thing for this was they created a widget where you could select a bunch of different tables that it would apply to and then it's rendering the macro then in the macro it's doing all of the the code to figure out what that filter would be so you have these are all of the options and that choice lists and then you have these are all of the the filter types that that correspond with your choices and again this thing is massive so you can go pretty deep into the functionality that you may need and then so an interesting thing the way they built that is when you come and add that specific widget it's actually going to be under the widget name that I that was created so I created it as a custom interactive filter dates and these are the three options that I selected in that widget so you have the open date chain on for change incident and problem and then you could go ahead and just add each individual one to your to your dashboard there's a lot of different things that you can definitely create these filters and I could essentially help you out with with a lot of different things [Music]

View original source

https://www.youtube.com/watch?v=74CgWQj-8ok