Hello, can I use the AF attribute DR to get the tag description ?
Sadly not, but there is another option if you have AF 2.7 on wards.
You can use the Analysis DR to get the description.
Say you have an Attribute with the PI Point configured, then you can have another attribute that has the output of an AF Analysis which is fetching the description. So...
That is a neat little hack! Looks like Zero & Span can be had this way too.
I wish a 'Split' function is also included to fetch a part of the description - for instance if a Tag has additional information in a PI Tag description that we need displayed in a Coresight display, that would be amazing! Tag's description can be 'Substation ABC 128KV', 'Substation Charlie 69KV'. How do I extract '128KV' and '69KV'?
You can handle these kind of meta data information using the PI Asset Framework.
Edit: please disregard. I shouldn't answer questions without verifying the context.
Asset Analytics has several String related functions. However, every substring you wish to extract would need to be output to its own attribute.
That said, there is a possibility that rather than the output being a string attribute, you could parse out the numbers "128" instead of "128KV" and let the attribute be a Single or Double with an appropriate UOM assigned.
Note expressions above the red line returns a String, and the expressions below the red line return floating point numbers.
How do I parse out numbers using string builder DR? The functions currently allowed cannot do that or I couldn't figure out how to using my example.
I might have something like Heightstown 69/12KV. I want to extract 69/12KV which can be done using Mid function but the name of the city has arbitrary number of chars. Not sure how to split the string. I don't mean to hijack this thread for my own question!
Rhys has explained how to get the PI Points descriptor using TagDesc() Analysis function. There exist functions specifically for string operation that may allow you to do what you like to do. I could imagine that e.g. the InStr() function may help you to locate at what position string "KV" starts and that you can then use a combination of Len, Right and Left to get the information you need.
I thought you were the OP. Perhaps you should make your own question. Please provide pertinent details.
I've branched your question from this other one because I felt you were asking something different even related.
I understand that you do have an AF Attribute that is using the PI Point Data Reference. When trending this attribute in PI ProcessBook, you like to see the information of the PI Points Description. The answer is 'yes', this is what you get e.g. with an Element Relative display when configuring the Trend to show the Description.
If this is not the information you're after, please explain more detailed what you like to accomplish.
Retrieving data ...