logo

NJP

Adding fiscal period filtering to date fields in ServiceNow

Import · Oct 14, 2023 · video

this video we'll look at adding fiscal period uh filtering in service now so if you go into any table and service now here I'm in the incident table and you go to any date field in the filter opened uh we get a lot of helpful uh filtering options here so this month last month uh this year next year last year Etc um a common reporting requirement if you are working for an organization that has a calendar that's different than the uh regular calendar is to be able to report on fiscal periods so for example I worked at a school district and our fiscal year was the school year which went from July 1st to June 30th so business users always wanted to know things like well what how did we do last fiscal year compared to this fiscal year um so it's possible in service now to get fiscal periods into this uh filtering option and that's what we're going to look at so the first step is going to be to install the fiscal calendar plug-in so you go to plugins and I already switched it to the uh kind of classic view fiscal calendar and you see it's this plugin here com snc fisical calendar I have that installed then we can go and if you already have it installed go and check fiscal periods see if there's anything in there uh because if there is something in here already you can't generate another fiscal calendar um so you'll have to use whatever is maybe somebody else did it already and it's already in here so you can skip this whole step if you don't have anything in there then you're going to want to generate your fiscal period periods so let's do that here we'll say this is a standard and fiscal unit we'll use quarters and we'll say the start month is let's say this is like the school district so start month is 07 start date is 01 and we'll start this uh let's do this in the past because let's say we have some data from previous years so let's go from 2018 uh all the way up to say 20 well let's keep it a nice 20 years so 2038 and the prefix for the year will be FY let's call this syy like school year and prefix for the quarter is q and for the month is M that's perfect so let's generate the calendar right so it gives you this warning message and not don't close the page I'll say okay and after a while it will say record updated and it will redirect you to here I did pause the video because uh can can take a few seconds I think it took about 15 seconds um so like like the warning says don't close the page just wait uh especially if you've generated uh a longer fiscal period you know I I did 20 years and only took 15 seconds and this is a PDI so if you're on a uh instance that's even subr it should be faster than that um okay so it redirects us to the fiscal periods here we are great um now I think if we go back to incidence I think it automatically sticks those and let's do op uh yes it does see it automatically puts in our fiscal period so now we have last fiscal year next FIS year uh and if I do open last fiscal year right it's going to give me stuff uh from July 1st to uh June 30th um but now let's say we go to another table either a custom table uh let's see if I can find one in here that doesn't have it well before we even do that let's go see where the definition is of what tables get it um so for that we go to calendar calendars for package and okay yeah so only the incident table uh gets it right now although we do have a few globals and I'm although I don't think those work right so in this table we're defining the package and the calendar that it's going to get so let's go for something that's not defined I think if we look at like change request we go here we go opened uh right we don't have those fiscal periods so let's say we want to add this to change request we'll go back to our uh calendars for packages and we'll just fire up a new record here and let's say the calendar we want is fiscal year and the package we want is I think it's called change request there's quite a few of them in here yeah change request and fisal here let's save and then let's also give it fiscal quarter say we'll do an insert and stay okay then we'll head back to change requests and oops do this do open and here we go we have fiscal quarter and we have fiscal year um so just one last thing to note is that for these uh tables in the global scope like incident and change uh they have separate packages when we go back to this calendars for package for packages uh so incident and change because their Global scope have their own um their own package but if you're doing something like um and I don't have it installed on this instance but like HR uh which nothing gets installed by default when you do the fiscal calendar it the HR tables don't uh don't get that uh then you just Define the package by the scope so you do human resources core for example and that will give you those filtering options on all the HR core tables uh you'd have to add like life cycle events and employ relations if you want it on those tables um but it's basically the whole scope it does it for so that is how to add uh fiscal period filtering in service now

View original source

https://www.youtube.com/watch?v=tYsXf3dNdSI