| XAField Class | 
Code of field: A (for Array)
Type of field:fixed array of discrete data.
Storage: one integer with value in the range 0…8 for each subfield.
Applicable to:
96 wells microplate discrete data (-, +, weak, ...)
384 wells microplate discrete data (-, +, weak, ...)
Free array data, discrete data
 Inheritance Hierarchy
Inheritance HierarchyNamespace: Biolomics.BioCallback
 Syntax
SyntaxThe XAField type exposes the following members.
 Constructors
Constructors| Name | Description | |
|---|---|---|
|  | XAField(XAField) | 
 Clone an instance of the XAField class.
  | 
|  | XAField(TAField, XRecord) | 
 Initializes a new instance of the XAField class.
  | 
|  | XAField(XAField, XRecord) | 
 Clone an instance of the XAField class with different parent record.
  | 
 Properties
Properties| Name | Description | |
|---|---|---|
|  | FieldValue | 
 Gets or sets the field value.
 (Overrides XFieldFieldValue.) | 
|  | IsModified | 
 Gets or sets a value indicating whether this instance is modified.
 (Inherited from XField.) | 
|  | Subfield | 
 Gets or sets the subfield.
  | 
 Methods
Methods| Name | Description | |
|---|---|---|
|  | CanRead | 
 Determines whether current connection can read from Field.
 (Inherited from XField.) | 
|  | CanWrite | 
 Determines whether current connection can write from Field.
 (Inherited from XField.) | 
|  | Clear | 
 Clears this instance.
 (Inherited from XField.) | 
|  | Clone | 
 Clones this instance.
  | 
|  | CloneAsXField | 
 We cannot use name 'Clone' here otherwise Implements vector.TId(Of XSField) fails because XSField.Clone() returns a XField instead of a XSField !!!
 (Overrides XFieldCloneAsXField(XRecord).) | 
|  | Count | 
 Counts subfields.
  | 
|  | DataToView | 
Converts field value to readable string.
 (Inherited from XField.) | 
|  | DataToView(Int32) | 
 Mandatory otherwise DataToView(5) returns letter 5 of string given by DataToView(), instead of the subfield value
 (Inherited from XField.) | 
|  | Equals | 
 Determines whether the specified Object is equal to this instance.
 (Inherited from XField.) | 
|  | Field | 
Field which contains data
 (Overrides XFieldField.) | 
|  | FieldDef | 
 Gets the Field definition.
 (Inherited from XField.) | 
|  | FieldType | 
 The Field type.
 (Inherited from XField.) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) | 
|  | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | Key | 
 Gets Field Key.
 (Inherited from XField.) | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(Inherited from Object.) | 
|  | ParentRecord | 
 Gets the parent record.
 (Inherited from XField.) | 
|  | Read | 
 Reads the Content from source object.
 (Inherited from XField.) | 
|  | Reset | 
 Resets this instance.
 (Inherited from XField.) | 
|  | SetDefaultValues | 
 Sets the default values.
 (Inherited from XField.) | 
|   | TextToValue | 
 Converts AField value to index string
  | 
|  | ToString | Returns a string that represents the current object.(Inherited from Object.) | 
|   | ValueToText | 
 Converts integer text to AField value
  | 
|  | Write | 
 Writes data into a TQuery
 and Format it depending to field type
 (Inherited from XField.) | 
 Examples
ExamplesImports System Imports BioloMICS.BioCallback Imports BioloMICS.SharedClasses Public Class Program <STAThread()> Shared Sub Main() Dim program As New Program program.ChangeField() End Sub ' Write sub functions here Public Sub ChangeField() ' get the current connection Dim SqlCo As XConnection = Run.GetCurrentConnection() If SqlCo Is Nothing Then Return End If ' get a table from its User name Dim TableDef As XTableDef = SqlCo.GetTableDefByUserNameEng("Your_Table_Name") If TableDef Is Nothing Then ' may happen if that table doesn't exist Return End If ' load a A-Field from that table Dim FieldDefMap As New XFieldDefMap Dim FieldDef As XFieldDef = SqlCo.GetFieldByUserNameEng("Your_AField_Name", TableDef.Key) If FieldDef Is Nothing Then ' that field doesn't exist Return End If FieldDefMap.Add(FieldDef) ' load all records Dim Where As XWhere = XWhere.Eq("_id", 2) Dim RecordMap As XRecordMap = Run.LoadRecords(TableDef.Key, FieldDefMap, Where) If RecordMap.Count() = 0 Then Return ' no record loaded: nothing else to do End If For Each Record As XRecord In RecordMap ' get the Field from the loaded record Dim Field As XAField = TryCast(Record.Fields(FieldDef.Key), XAField) If Field Is Nothing Then ' this field doesn't exist or is not a A-Field Continue For End If ' ***** A Field ***** ' A field value meaning: ' ? 0 Unknown ' - 1 Character is absent ' 2 (unused) ' w 3 ' -, d, w 4 ' + 5 Character is present ' +, d, w 6 ' d 7 ' -, + 8 ' change the field value: replace all 'd' by '+, d, w' for the second subfield If Field.Subfield(1) = 0 Then ' d Field.Subfield(1) = 6 ' => +, d, w End If Record.Save(False) Next End Sub End Class
 See Also
See Also