Difference of records between incident and corresponding SLA table
hi guys welcome back to my channel in this video we will discuss about one of the pain points highlighted by someone so sometimes what happens is talk management just drops us an email asking for the list of incidents along with the list of slas so sometimes the count is not equal in both the list because of a couple of reasons one such reason is that slam was not attached to that particular incident so it is not there in the sla list but it is there in the incident list for that particular week or a month so today we will see how we can figure out those records uh which are not present in both the list so that we can easily create a report and state the reason that that this is the reason because of which this particular incident is not present in both the lists so let me just open the incident list over here and give a condition [Music] that record created on this month so we can see that there are a total of 891 records now let me just open my sla table as well side by side so here also i'll add the similar condition so created on this month so after giving this condition i'll just go by the task records because records are present both for response and resolution so here i can see that a total of 889 records two records are missing from this particular list now it becomes difficult to find those two records in such a big list until and unless you are an excel expert to figure out those records so what i'm going to do is i'll write a background script to figure out which two incidents are missing from this list because even i am not an actual expert so my table name is task and disk sla i like one encoded query and i'll copy my query from here now i'll create this particular table and i'll look through it and you create a variable here named records now what i'm going to do is i'll create a string of incident numbers over here so i'll just fetch the incident numbers over here so that i have the unique count so i'll fetch those details here so records is a string which contains all the incident numbers from sla table separated by a comma now what i am going to do is i will look through incident table and i'll copy my query from here again i look to the record now i will check whether the incident number present in the incident table is part of the list or the string which i created earlier or not so i will check with the records dot contains inc dot number since name of the field is number if it is not there i will pin that particular incident number into the logs so let's see if this works out for us if not we will have to figure out something else i'll learn so these are the two incident numbers which are not present in the sla table so let's see why these two incident records are not present so i'll search here with the incident number what is the specific reason if i open this particular incident so it is taking a bit time yeah it is open now so we can see that sls are not attached to this particular incident that is why it was not part of the sla list so this is one way in which we can figure out the difference in counts between the two lists there are a couple of other ways as well but if you somebody wants to do it by the background script this is one of the convenient way i sometimes use and this gives us a good count and the exact count of the incidents which are not part of either of the lists and it helps us in explaining why there is a difference in counts between both the list of your cards thank you for watching and if you guys have any of the pain point which you want me to create a video on just let me know in the comments and i'll get my next video or i might get my next video on the same pain point who knows thank you for watching bye
https://www.youtube.com/watch?v=4-SVi1sxDV4