1 of 1 people found this helpful
OK. So tag name recognition is kind of complicated in PI ProcessBook because users have named pi tags all sorts of things over the years. The "Tag" field could be a PI tag, it could be a dataset reference, it could be a context reference, or it could be a custom dataset (it turns out that AF2 is a custom dataset, it's just one we wrote).
I don't remember the exact logic it uses off the top of my head, but it starts with the more complicated cases and ends with the simplest one (pi tag). In general, if it has a "." in the name, it checks the handler that is before the "." to see if it is a legal reference. If not, it checks to see if it's a pi tag. This is because you can have pi tags with "."s in them (older versions of PB would assume it was a dataset and not find the tag). Once PB determines the type of the tag, it sets Symbol.TagInfoType, which you can check to see what type it found. You can also use Symbol.SetTagNameWithTagInfoType("tagname", pbDataSet) in order to constrict the search to a specific type when you are setting it.
However, in this case, "AF2.|Age" isn't a valid AF2 data reference (the AF2 add-in considers it a valid reference if it at least starts with "AF2.\\afserver\database". Since in this case it doesn't, it checks to see if it's a pi tag. That will fail too, so it leaves the TagInfoType as pbUndetermined, which is why it's defaulting to the "Tag Search ..." option.
Thank tou for the explanation. It has been very useful and I'm now able to have a control on this comportment.