HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

Describes entity field information. Fields are mapped to columns in databases and at the same time they are used to be displayed in screen sections.

Important

Following accepted naming conventions is especially important when it comes to fields. If you use a strong naming convention, it will save you a lot of work later on, when you will create database queries, user interface or business logic rules.

Entity Field Types

Database Field

Maps an entity field to a physical, such as database or column.

Virtual Field

Provides a basic field type not mapped to a database. Can be used for in-memory operations.

Function Call Field

Calculates a value by calling a basic or a database function.

Aggregated Field

Calculates the total value from selected child entities using an aggregation function.

Lookup FieldLooks-up a value from another entity based on a field in the current entity using a lookup.

Common Attributes

AllowNullsTrue if values in this field can contain null values. False if null values are forbidden.
AutoIncrementTrue if this field's values should auto-increment. DataType must be Integer. When used on a virtual field it will automatically number all records starting from 1. This can be used as a virtual primary key if the data in the database have no key or if the data will be aggregated.
Caption

Description of the field which will be shown to users on screens.

This value can be overriden in a data structure field and also on the screen section widgets.

DataLengthIn case that DataType is String, this value sets the maximum length of the text field. It automatically sets the maximum size check of text boxes in screens.
DataTypeSpecifies a data type of this field.
DefaultLookup

If the field is a reference to another entity, you can select a data lookup. This lookup will be then used as a default lookup for drop-down box lists in a User Interface Designer. It will also be used to substitute id with a looked up value in data structures.

The lookup is also used by the Data Audit Log for storing the textual representation of the value instead of just the id.

This value can be overriden in a data structure field.

DefaultValue

If default value is expected when inserting a new record (either by user interface or workflows), here you can specify a data constant, which will be used as a default.

AllowNulls must be set to False in order to DefaultValue be active.

DefaultValueParameter

A parameter that will be used for assigning the default at run time. This is useful when you want to pass the defaults when calling the data structure. You can also use one of the system parameters (e.g. parCurrentUserId). This way you will be able to assign automatically e.g. a current user to the data field.

When no value is passed, the DefaultValue constant is used.

ExcludeFromAllFields

If set to True the field will not be included in the list of fields in a data structure if AllFields = True is set in the data structure entity. This is useful e.g. for database function calls which are expensive and to be only used for specific queries or lookups and would otherwise slow-down the system if loaded e.g. by screens.

If you want to use such a field you need to add it specifically as a new data structure field.

IsPrimaryKeyTrue if this field defines a primary key. If the entity contains multi-column primary key, you can select more fields as primary key.
OnCopyAction

Specifies an action to be used when a user copies/duplicates a record.

  • Copy – The value will be copied (default).
  • Initialize – The value will be initialized (emptied or filled with a default value if specified)
  • PrependCopyText – The value will be copied and a "Copy of ][original text]" will be prepended. This can only be used for string fields.
XmlMappingType

Specifies how the value will be mapped when accessing the data using XML (e.g. in APIs or XSL Transformations).

  • Element – The value will be rendered as an XML element (e.g. <MyField>value</MyField>)
  • Attribute – The value will be rendered as an XML attribute (e.g. <MyEntity MyField="value"/>)
  • Hidden – The value will be hidden from the XML.

This value can be overriden in a data structure field.

ForeignEntity

If the field is a reference to another entity, here you can specify that entity.

Foreign keys will be included in the DDL scripts when using the Deployment Script Generator and corresponding foreign-keys will be created in the database. The checks will be done on database level only.

The foreign-key information is also be used by the DataService.UpdateReferences method to automatically help you with data deduplication.

ForeignEntityColumnThis attribute specifies a primary key to which this field is related.
  • No labels