OSIsoft: Display the notification historical information in Excel using PI DataLink. v1.1

Uploaded by OSIsoftLearning on 10.05.2011


Now here's an example of how you can
retrieve the Notification History in
DataLink. This is the Add-in to
Excel, PI DataLink. It has,
as you can see, an Option over here call Notification Search.
That's what we would use to retrieve this right here.
So, that's what it's going to look like. Let me
go ahead and select everything. I will delete it and
then I will start from scratch just to show you how it's going to work. Now, first of all.
This is something that's only going to show you
Notifications that you are currently subscribed to
as the User that you are using
Excel with. So, if you launch as a Windows
User who's not subscribed to anything, you are not going to be able to find anything
here. So, here's how we would do it. We should
specify what we are trying to search for
and then how we are going to Output that. Now,
we choose what we want to search for by simply
looking for those same three things we have been looking before.
Do we want to see just the Active ones?, just the --
a specific time range?, the recent ones?, etc.
I will specify I want to see the last one day.
My Output Cell is defaulting to
wherever I was when I first in -- or first
clicked on that Notification Search.
So, with that as my Output Cell,
I will go ahead and choose Search.
Here are the results. If this looks good,
if I do not need to make any changes to the format,
then I will just go ahead and say OK.
And here's our end result.
Okay, so I got a certain
number of Default Columns, but, as you can see, I can
change that all I want. I can change it after the fact
by -- well, there are a couple of ways. Probably the
simplest way to do it, instead of just doing this
all over again, is to do a right mouse-click
and then choose Notification Search again
from that dropdown menu there. And when
that comes up, now it's going to be pre-populated
with what you had configured before. In this case,
the recent, the one day, etc. So, I can
make changes to that if I need to. I will switch this over to
one hour. I will get
considerably few results. And, it,
it adjusts the sh... the size
of the array that's being returned.
If you notice, this is actually returning the results into
an array. an Excel array. Now, you
can tell it's an array. You see the little curly brackets
there? That's the indicator that this is a set of
array results for this function even though the Contents --
if you look at the actual Contents -- they are the same in
each of the, each of the cells in that array.
So, what I would like to do now is just
kind of go over some of those things that
we have seen before but are in a slightly different User Interface
now. So, for example -- let me set
this back to -- I will go with two days here.
Yeah, for example,
if I would like to display those Contact Events,
this is how we do it. And you have some choices
as you, you know, display them. Do you indent them or not?,
etc. If you are going to display
those Contact Events, you probably want
to put the Name of the Contact in the
actual Action that we are reflecting.
Now, look at the results now. And now,
we are seeing these two extra Columns, Contact
and Action, and of course, we are seeing the
individual -- those individual Events, those Contact
Events: when I resend things;
here's some errors from a WebService that's
mis-configured. So, you know, these are the types of
Contact Actions that we see.
Let's go back in, and I will,
I will select anywhere in here, and I can,
I can either choose the Notification Search
again or I can choose this
Notification Search up here.
And, as you can see, we pick up what, what' we have already
configured here. So, as I said,
that's probably the best way to go about it. And this is where you
can control all of the, you know, all of the things
that you would normally want to display, all the different Columns you'd want to display.
Now, there's an Option here that we have not look at
yet, this Select Notification Results. You know, this is
basically for, I guess, the most
popular reason for having this here, or the most
common reason for using this is
when you want to delete some results, because watch what happens
if you just select a cell and you try to delete.
Well, this is because this is the typical array behavior
within Excel. That's part of an array. I cannot delete
it. So, how do I select it all? Well, if you are
real good with Excel, you can do a Control-Shift-Down Arrow,
etc. But, anyway, well, the easiest way --
just right-click anywhere, choose Select
Notification Results, and then you can go ahead and delete it, and
now it's truly gone.
Now, I, I have got these two timestamps here.
This is a Start Time and End Time. Let me format this a little
bit better. We will call this the Start
and the End. Yeah,
what I wanted -- what I have had these here for is I wanted to show you
how you can make cell references to
this Start Time and End Time so that you can get yourself
a, a nice little engine for an..., an... analyzing Notifications
on the fly just by changing
the Contents of this. Let me demonstrate.
I will go ahead in here and do a New Notifications Search.
But now, instead of choosing just
the -- a specific Recent Time, or Active, or whatever, I am going to
specify a Time Range, and I am going to make cell
references to this Start Time and End Time.
So, I will chose that for the Start Time. I will choose that
for the End Time, and that's
my Output Cell. That's where I had been selected when I
first invoked this. I will go ahead and choose Search.
Now here are my Search Results,
and when I click on OK, it
generates an array of the size, you know, that I
was interested in, going back one day. Watch what happens,
though, if I change this. Instead of one day, let's go back
two hours. Yeah, see, this is going to
update in real-time. Okay.
If I, if I go in here and
let's do this Search again. I guess it's
a little bit more obvious if I were to go ahead and change
the Display Format. Let's add the Action
and the Contact again.
I think I have been looking at this with the Contact first.
That's the person. And,
so for the Search, we will use that Start and End Time again.
so that's two hours of results. Let's,
let's change that. Watch what happens
with this array -- and let me
maybe move this over so make it a little bigger there.
Yeah, watch what happens to this array
when I extend this from two hours to, say,
two days. I will go ahead and change this to two days.
And something
interesting's happened here. We retrieved, or we
wanted to retrieve more information. But, as you can see, it says
down here, we need to resize to show all.
So, what's going on here? Why do I have to
do this Recalculate, Resize? Why did I have
to do that? If you have got, you know, a situation
like what we just saw where we generate
an array that's a certain size
and then you change the Inputs to increase the number
of results. So, again, let me demonstrate
that again. What I had done -- I had originally
generated this with two hours
and I only got one result.
Let me go ahead and resize
this to match the results here.
With that one result, you notice
the array ends right here. But, if
I, if I change this to
two days, I do get more results.
The array still ends there, but
it needs to be larger. So that's why we have this Option
called Resize. And that's
going to go ahead and extend that array down. Okay.
If I am working within this Notification Search User Interface
here, all those same, you know, functionalities
that we have seen before, are available. So,
if I go out and do a Search, and I see something that does require
Acknowledgment or require Comment,
etc., I can do that from here. Same as what we have seen
in our previous interfaces.