We have set up an AF database including a root element and many sub-elements directly under it, each of which have 3 or 8 attributes. These attributes have either a PI Point data reference or a Table Look up data reference. In order to enjoy the benefits of Auto Tag creation, we have used substitution parameters within all of our data references such as you can see below within the error messages we receive when attempting to query the Data.Current table for actual attribute values. We understand that at this point, only PI Tag data is available and that is fine for now. I have created several system environment variables for use as substitution parameters. For example, environment variable DISC having value "DISC" for use in a data reference within AF. The AF application resolves the dynamic path perfectly well. The problem is that, within PI SQL Commander, the AFSDK, chokes on the dynamic path and fails to resolve the path containing a system environment variable substitution parameter. Also, if the string literal "DISC" is simply used in place of a substitution parameter, AFSDK also renders the same errors. Logic written in .NET referencing the AFSDK in this way presents the same problem.
It seems that the parsing logic within AFSDK does not anticipate a string literal or an environment variable substitution. Hence, we are unable to access any data within the Data schema of the AF database which has been frustrating to say the least.
The problem is that we are completely unable to access current values from the Data schema within the AF database. We really need this bug fixed so that we may demonstrate the power of PI AF as a means to search, model, organize and better understand PI Data.
These are the results of a query in PI SQL Commander:
This Statement was executed twice in a row generating the following two different errors: It errors out every time with different results.
SELECT * FROM NU_AF_DEV.Data.Current WHERE ElementAttributeID IN
(SELECT ID FROM NU_AF_DEV.Asset.ElementAttribute WHERE ElementVersionID IN
(SELECT ElementVersionID FROM NU_AF_DEV.Asset.ElementHierarchy WHERE Path like '\CNVX.4C\'
Here is a PI Point data reference:
[OSIsoft.AFSDK] Invalid dynamic attribute path '\\%Server%\%..\Element%.%DISC%.%Element%.%Attribute%;pointtype=Digital;pointsource=R' was specified.
Parameter name: path
And a table data reference:
[OSIsoft.AFSDK] Invalid dynamic attribute path 'SELECT [ACKNOWLEDGED_DATE] FROM [ALARM_EQUIPMENT] WHERE [ALARM_ID] = '%..\ELEMENT%.%ALARM%.%ELEMENT%'' was specified.
Parameter name: path
Any help would be GREATLY appreciated.