AFAttributeValueQueryID Structure
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
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
| Name | Description | |
|---|---|---|
| AttributeID |
The ID of the Attribute. If the attribute is created from a template, this must be the ID of the Attribute Template.
| |
| ElementID |
The ID of the owning object of the attribute.
|
Methods
| Name | Description | |
|---|---|---|
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Overrides ValueTypeEquals(Object).) | |
| Equals(AFAttributeValueQueryID) |
Indicates whether the current object is equal to another object of the same type.
| |
| 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.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Operators
| Name | Description | |
|---|---|---|
| Equality |
The equality operator (==) compares its operands to determine if they are equal.
| |
| 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:
| Type | Equal | NotEqual | LessThan | GreaterThan | LessThanOrEqual | GreaterThanOrEqual | In |
|---|---|---|---|---|---|---|---|
| Boolean | Yes | Yes | No | No | No | No | Yes |
| UInt64 | Yes | Yes | No | No | No | No | Yes |
| String | Yes | Yes | No | No | No | No | Yes |
| Guid | Yes | Yes | No | No | No | No | Yes |
| Single | Yes | Yes | Yes | Yes | Yes | Yes | No |
| Double | Yes | Yes | Yes | Yes | Yes | Yes | No |
| All Others | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
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: