2 Replies Latest reply on Sep 22, 2016 5:06 PM by elhannaford

    ValidateCustomProperty Verb


      Both Orion.NodesCustomProperties and Orion.VolumesCustomProperties have a Verb named, "ValidateCustomProperty".  Does anyone know what this verb does?  Can anyone provide the parameters required for it and the expected output?


      From a lot of trial and error it seems that the verb expects 5 parameters: 3 strings, an integer, and a list of strings.  The output I get is a property bag with 2 properties: {"Status":3,"ErrorMessage":null}.  However, the format of the input and the meaning of the output remain vague.

        • Re: ValidateCustomProperty Verb

          This verb is primarily intended for the custom property management UI to provide feedback to users. It checks to see whether a given name is suitable for creating a custom property. It does not actually create a custom property or make any changes to the system.


          The parameters for the verb are:


          string PropertyName - name of the custom property

          string Description - description of the custom property

          string ValueType - one of {nvarchar, varchar, int, real, float, datetime, bit, ntext, text}

          int? Size - either null or an integer representing the maximum size of the custom property. Only relevant for the nvarchar and varchar data types

          string[] Value - optional list of values for the property. Used to constrain a string property to a specific list of possible values.


          But only first parameter (PropertyName) contributes to the validation result.


          In the returned object, these are the possible values for Status:


          0 = Valid. This means that you could call CreateCustomProperty with these arguments and expect success.

          1 = IsSystem. The proposed custom property conflicts with a system (non-custom) property.

          2 = IsReserved. The proposed custom property conflicts with a query keyword.

          3 = Exists. The proposed custom property conflicts with an existing custom property.

          4 = Error. An unexpected error occurred while trying to validate the proposed custom property. See the ErrorMessage property of the returned object for details.