2 Replies Latest reply on Jul 22, 2016 8:20 AM by pthivierge

    "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute

    XMPro_Gavin

      Hi All ,

       

      I am trying to read values for element attributes between two specific time periods.

       

      I am using the following code

       

      PIPagingConfiguration pageConfig = new PIPagingConfiguration(PIPageType.TagCount, 1000);

       

      //Get recorded value for all attributes between last processed datetime and current datetime.

      IEnumerable<AFValues> values = attributes.Data.RecordedValues(timeRange, AFBoundaryType.Inside, null, false, pageConfig, 0);

       

      When I execute this program by connecting to a OSISoft Server in my local machine it is working fine .

       

      When I execute the same program on a client application , I am getting the records and additional to the actual records I am getting few more records with the following values/errors .

       

      {

          "Element": "Rig7",

          "Element Time Stamp": "7/22/2016 3:27:12 AM",

          "Mud Specific Gravity": "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute 'Attribute 'Mud Specific Gravity' in Element 'Rig7' in Element 'Clear Fork' in Element 'West Texas''\r\n   at OSIsoft.AF.Asset.AFAttributeList.MakeRDACall(AFAttribute attribute, String methodName, Object[] methodParameters, Int32 uomParamIndex)\r\n   at OSIsoft.AF.Asset.AFAttributeList.FillInMissingValues(IList`1 pages, Dictionary`2 inputs, String rdaMethodName, Object[] rdaMethodParams, Int32 uomParamIndex, AFTime badTime)",

          "Drill string volume": "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute 'Attribute 'Drill string volume' in Element 'Rig7' in Element 'Clear Fork' in Element 'West Texas''\r\n   at OSIsoft.AF.Asset.AFAttributeList.MakeRDACall(AFAttribute attribute, String methodName, Object[] methodParameters, Int32 uomParamIndex)\r\n   at OSIsoft.AF.Asset.AFAttributeList.FillInMissingValues(IList`1 pages, Dictionary`2 inputs, String rdaMethodName, Object[] rdaMethodParams, Int32 uomParamIndex, AFTime badTime)"

        },

       

      1) Can any one know when we wil get "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute 'Attribute 'Mud Specific Gravity'  error

      2) Why only in my client application server I am getting these records , why I am not getting this error values in my local computer . The program was same in both my computer and client application.

       

      Thanks for your help.

        • Re: "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute
          John Messinger

          Hi Gavin,

          What are the data references configured for the "Mud Specific Gravity" and "Drill string volume" attributes throwing this exception? If they're not PIPoint data references, can they provide time series values? The DR needs to support GetValues in the AFDataReference.SupportedMethods property.

          On your second question, assuming your local computer is your development machine, are you running everything locally (your application, PI-AF server, PI Data Archive server etc)? Is your client application server and local computer connecting to the same AF and Data Archive servers? Is your custom application running under different credentials between the two systems?

          • Re: "System.NotSupportedException: The data method 'RecordedValues' is not supported on attribute
            pthivierge

            Hello Gavin,

             

            1) This exception is usually throw when your attribute's configuration is set to a Data Reference that does not implement the recorded values method.  The PI Point Data Reference supports its.  As John asked, you should verify the attribute that is causing error and see what Data Reference type it is using.

             

            2) That would be good to check the version of the PI AF SDK on both machines and see if you are using the same version.

             

            Keep us informed