I would like an attribute in AF to be configured to show the annotation for a specified PI Point rather than its value. Is this possible? If so how?
It looks like OLEDB has some complications. Please see this KB on annotations and how they are read/written with our products:
As I mentioned before, PI OLEDB Enterprise, which will allow you to query AF, does not expose the annotations' text, only the fact that values are annotated or not.
PI OLEDB Provider will allow you to query a tag name through the picomp2 and snapshot tables to get annotations, but it can only display Unstructured annotations (i.e., just text), but not Structured annotations (a collection that has the annotation text and some extra info such as the user who added the annotation). So unless your annotations are unstructured, it looks like the PI OLEDB route won't work.
I don't see a way out of the box to display the annotation as an attribute value, but if you have a PI Point Data Reference attribute in PSE and the value displayed is annotated, then you should see an annotation icon to the left of the attribute name. When you hover over this icon, you can see the annotation value come up in a tooltip (see screenshot below):
Would this suffice for your purposes?
If you are interested in programmatic methods then I you may want to take a look at this previous post and AFSDK help files:
Retrieve AFAnnotation Values - Visual Basic
Yes, but that is not very useful.
Can the annotation for the AF attribute be viewed via DataLink? or , more importantly for me, via OLEDB Enterprise SQL command?
You can see them in DataLink with the Compressed Data function by checking the box to "Show annotations."
As for PI OLEDB Enterprise, it looks like the best we can do is show whether or not the value is annotated; the column in the Data tables for Archive and Snapshot is just a Boolean (True if annotated, False if not). I'll look into this further and post back here if I find a way to get at the annotations with OLEDB.
Hmm, perhaps this is a feature Osisoft may consider implementing for the next version of OLEDB Enterprise? It would be quite useful for shift reports.
Thanks for your responses, I will try the PI OLEDB method via picomp2.
Retrieving data ...