Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAttributeValueQueryID Structure

  • Last UpdatedNov 18, 2025
  • 4 minute read
AFAttributeValueQueryID Structure
Attribute value search by ID query structure.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

[SerializableAttribute]
public struct AFAttributeValueQueryID : IEquatable<AFAttributeValueQueryID>
<SerializableAttribute>
Public Structure AFAttributeValueQueryID
	Implements IEquatable(Of AFAttributeValueQueryID)

Dim instance As AFAttributeValueQueryID
[SerializableAttribute]
public value class AFAttributeValueQueryID : IEquatable<AFAttributeValueQueryID>
[<SealedAttribute>]
[<SerializableAttribute>]
type AFAttributeValueQueryID =  
    struct
        interface IEquatable<AFAttributeValueQueryID>
    end

The AFAttributeValueQueryID type exposes the following members.

Properties

  NameDescription
Public property
AttributeID
The ID of the Attribute. If the attribute is created from a template, this must be the ID of the Attribute Template.
Public property
ElementID
The ID of the owning object of the attribute.

Methods

  NameDescription
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Overrides ValueTypeEquals(Object).)
Public method
Equals(AFAttributeValueQueryID)
Indicates whether the current object is equal to another object of the same type.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides ValueTypeGetHashCode.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)

Operators

  NameDescription
Public operatorStatic member
Equality
The equality operator (==) compares its operands to determine if they are equal.
Public operatorStatic member
Inequality
The inequality operator (!=) compares its operands to determine if they are not equal.

Remarks

This structure describes the query used for finding AFElements using the GetAttributeValues(PISystem, IListAFAttributeValueQueryID, Object, Boolean, WindowsIdentity) method or GetAttributeValues(PISystem, IListAFAttributeValueQueryID, Object, Boolean, WindowsIdentity) method.

The Type property of the attribute template determines the type of value to be queried, therefore the type must be defined and not set to a type of Object. Any AFAttributeTemplate with a DefaultUOM specified must be of type Single or Double. If a DefaultUOM is not specified in the template for one of these types, then the search will be performed using the specified attribute value as being in the canonical units-of-measure which could cause unexpected results to be returned. The following table shows which AFSearchOperator is supported for each type of value being queried:

TypeEqualNotEqualLessThanGreaterThanLessThanOrEqualGreaterThanOrEqualIn
BooleanYesYesNoNoNoNoYes
UInt64YesYesNoNoNoNoYes
StringYesYesNoNoNoNoYes
GuidYesYesNoNoNoNoYes
SingleYesYesYesYesYesYesNo
DoubleYesYesYesYesYesYesNo
All OthersYesYesYesYesYesYesYes

When the Type property of the AFAttributeTemplate is String, search performance can be improved by marking the AFAttributeTemplate as being indexed by setting the IsIndexed property. Also, the following restrictions are placed on the string length of the attribute value used in the query:

IsIndexedOperatorLength Limit
Equal or NotEqual40 characters
In40 characters
Equal or NotEqualNo limit
In4096 characters when using PI AF Server 2.6 or greater; otherwise 40 characters

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10

See Also

TitleResults for “How to create a CRG?”Also Available in