TDAField
From RemObjects Software
This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.
Overview
TDACustomField expands the abstract TDABaseField to add properties and methods needed for field definitions in data tables, both in the schema and data dictionaries as well as in live TDADataTables.
File
uDAInterfaces
Declaration
TDAField = class(TDACustomField);
Hierarchy
- TDABaseField
- TDACustomField
- TDAField
- TDACustomField
Properties
| | | |
|---|---|---|
| Calculated | Boolean | Indicates whether this field is Calculated, or not. Calculated fields do not have direct a physical representation on the database, their value is instead generated on the fly, client side, based on other fields in the same record. For example, a calculated Fullname field could obtain its value by concatenating FirstName and LastName. Calculated fields usually are read-only and do not log changes (since there is no storage space where such changes could be persisted in the database). |
| DictionaryEntry | String | Specifies the data dictionary entry to use for this field. If assigned (and a TDADataDictionary is assigned to the schema), specific properties of the field will automatically be filled from the data dictionary, rather then being stored with the field itself. This allows to easily share field attributes across an entire application, by defining common field settings in the data dictionary and linking all relevant fields to that dictionary entry.
The following field properties are affected by this. If you are using Schema Modeler to edit your field definition, you will notice that these fields automatically gray out as you assign the DictionaryEntry:
|
| InPrimaryKey | Boolean | Specifies whether this field is part of the primary key for the dataset. The primary key (or short PK) consists of the field or fields that uniquely identify each record in a dataset and, eventually, the underlying database table. Please refer to your database system's documentation and general database design guidelines for more information on primary keys. |
| KeyFields | String | Contains the key field or key fields that contain the original value to be looked up on the LookupSource. |
| Lookup | Boolean | Indicates whether the field is a Lookup Field, whose value will be determined at runtime by looking up values from a different dataset. Similar to calculated fields, lookup fields are not direct representations of a field in the back-end database, but are filled at runtime, usually by using a Foreign Key Relationship to look up values from a secondary table. For example, an Orders table might store a CustomerID field, and additionally have a CustomerName lookup field defined, which will be filled by obtaining the appropriate name (the LookupResultField) from the Customers table (the LookupSource), using the CustomerID (the LookupKeyField). |
| LookupCache | Boolean | Toggles whether values for lookup fields will be cached (true) or reevaluated whenever they are needed. Set this property to true for optimal performance, if data in your lookup source changes rarely; set it to false to make sure your lookup values are always up to date if your data changes frequently. |
| LookupKeyFields | String | Holds the key field or key fields that will be used on the LookupSource to locate the appropriate record. |
| LookupResultField | String | Defines of the name of the field (in the LookupSource) that contains the result value for the lookup. This field's value will be used as the value for the lookup field itself. |
| LookupSource | TDataSource | Sets the TDataSource that will used as the source to look up field values. |
Events
| | |
|---|---|
| OnChange | Fires whenever the value of a particular field has been changed. |
| OnValidate | Fires whenever the value of a particular field is about to change, given the event handler opportunity to validate and possibly reject the change by raising an exception. |
See Also
Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)
Lists — Glossary — Features — How To — Drivers — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | Data Abstract | Architecture | Class | Delphi
