Grooper.Core.LookupSpecification

A Lookup Specification defines a query against an external data source, which is used to validate and/or populate field values. Lookup Specifications are created on container elements in a Data Model. Each Data Model, Data Section, and Data Table object may define a collection of Lookup Specifications which apply to its child fields.


Inherits from: Grooper.EmbeddedObject

Constructors

Signature Description
New (Container As DataFieldContainer)
Parameters
Container
          Type: DataFieldContainer
          

Fields

Field Name Field Type Description
Database As Grooper.GrooperDb Grooper.GrooperDb

Properties

Property Name Property Type Description
ConflictDisposition Grooper.Core.LookupSpecification.ConflictDispositions Specifies what happens if the lookup returns multiple results.Can be one of the following values:
  • Normal: Flag the lookup fields and clear the target fields.
  • Flag: Flag the lookup fields.
  • Accept: Use the first row in the result set.
  • Ignore: Do nothing. Behave as though no lookup is defined.
FieldPopulation Grooper.Core.LookupSpecification.PopulationMethod Specifies how target fields are populated with the lookup results.Can be one of the following values:
  • Overwrite: Populate the target fields.
  • Supplement: Populate the target fields if they are empty.
  • None: Do not populate any fields.
HasReferenceProperties System.Boolean Returns true if the object has properties which reference Grooper Node objects.
IsEmpty System.Boolean Returns true if all properties with a ViewableAttribute are set to their default value.
IsWriteable System.Boolean Returns true if the object is writable, or false if it is not.
LookupFieldList System.String The list of fields used as lookup criteria.
LookupFields System.Collections.Generic.IEnumerable(Of T) Override this property to indicate the Data Fields that are included as criteria in the lookup.
MissDisposition Grooper.Core.LookupSpecification.MissDispositions Specifies what happens if the lookup returns no results.Can be one of the following values:
  • Normal: Flag the lookup fields and clear the target fields.
  • Flag: Flag the lookup fields.
  • Clear: Clear the target field values.
  • Ignore: Do nothing. Behave as though no lookup is defined.
Owner Grooper.ConnectedObject Returns the node that owns the connected object, if any.
OwnerNode Grooper.GrooperNode Returns the node that owns the connected object, if any.
Root Grooper.GrooperRoot Returns the root node
TargetFieldList System.String The list of fields used to be populated by the lookup operation.
TargetFields System.Collections.Generic.IEnumerable(Of T) Override this property to indicate the Data Fields that are included as criteria in the lookup.
TriggerMode Grooper.Core.LookupSpecification.TriggerModes Controls when the lookup is executed.Can be one of the following values:
  • Auto: Trigger automatically when the value of a lookup field changes.
  • Conditional: Trigger automatically when the value of a lookup field changes, only if the target fields are currently empty.
  • Manual: Must be triggered manually by a user.

Methods

Method Name Description
GetFieldPath(Field As DataField) As String
Parameters
Field
          Type: DataField
          
GetLookupResults(Container As FieldContainerInstance, LookupValues As Dictionary(Of String, String)) As DataTable Override this method to return the Lookup results as a .NET Data Table.
Parameters
Container
          Type: FieldContainerInstance
          
 
LookupValues
          Type: Dictionary`2
          
GetLookupValues(Container As FieldContainerInstance) As Dictionary(Of String, String) Override this method to return the values of the lookup fields.
Parameters
Container
          Type: FieldContainerInstance
          
GetProperties() As PropertyDescriptorCollection
GetReferences() As List(Of GrooperNode) Returns a list of GrooperNode objects referenced in the properties of this object.
GetReferencingLookups(Instance As FieldInstance, Lookups As Dictionary(Of LookupSpecification, FieldContainerInstance))
Parameters
Instance
          Type: FieldInstance
          
 
Lookups
          Type: Dictionary`2
          
IsPropertyEnabled(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently enabled.
Parameters
PropertyName
          Type: String
          The name of the property to determine the enabled state for.
IsPropertyVisible(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently visible.
Parameters
PropertyName
          Type: String
          The name of the property to determine the visible state for.
IsType(Type As Type) As Boolean Returns true if the object is of the type specified, or if it derives from the type specfied.
Parameters
Type
          Type: Type
          The type to check.
ReadResults(Container As FieldContainerInstance) As DataTable
Parameters
Container
          Type: FieldContainerInstance
          
ReferencesField(Field As DataField) As Boolean
Parameters
Field
          Type: DataField
          
Serialize() As String Serializes the object.
SetDatabase(Database As GrooperDb) Sets the database connection of the object.
Parameters
Database
          Type: GrooperDb
          
SetOwner(Owner As ConnectedObject, SkipInitialization As Boolean) Sets the owner of the connected object with another object that implements the IConnected interface.
Parameters
Owner
          Type: ConnectedObject
          
 
SkipInitialization
          Type: Boolean
          
ToString() As String Returns a string value representation of the connected object.
ValidateProperties() As ValidationErrorList Validates the properties of the object, returning a list of validation errors.