element element element--element
Content model content-model-4
element:==(attribute | compute-string | dbindex | default | element | help | join | key | sysFilter | translatedDefault)
Attributes attributes-4
_operation (string), advanced (boolean), aggregate (string), applicableIf (string), autopk (boolean), belongsTo (string), convDate (string), dataPolicy (string), dataSource (string), dbEnum (string), defOnDuplicate (boolean), default (string), desc (string), displayAsField (boolean), doesNotSupportDiff (boolean), edit (string), emptyKeyValue (string), enum (string), enumImage (string), expandSchemaTarget (string), expr (string), externalJoin (boolean), feature (string), featureDate (boolean), filterPath (string), folderLink (string), folderModel (string), folderProcess (string), fullLoad (boolean), hierarchical (boolean), hierarchicalPath (string), img (string), inout (string), integrity (string), label (string), labelSingular (string), length (string), localizable (boolean), name (MNTOKEN), noDbIndex (boolean), noKey (boolean), ordered (boolean), overflowtable (boolean), pkSequence (string), pkgStatus (string), ref (string), required (boolean), revAdvanced (boolean), revCardinality (string), revDesc (string), revExternalJoin (boolean), revIntegrity (string), revLabel (string), revLink (string), revTarget (string), revVisibleIf (string), sql (boolean), sqlname (string), sqltable (string), tableSpace (string), tableSpaceIndex (string), target (MNTOKEN), template (string), temporaryTable (boolean), translatedDefault (string), translatedExpr (string), type (MNTOKEN), unbound (boolean), user (boolean), userEnum (string), visibleIf (string), xml (boolean), xmlChildren (boolean)
Parents parents-4
<srcschema>
<element>
Children children-4
<attribute>
<compute-string>
<dbindex>
<default>
<element>
<help>
<join>
<key>
<sysfilter>
<translateddefault>
Description description-4
There are four types of <element>
elements in 蜜豆视频 Campaign:
- Root
<element>
: defines the name of the SQL table that matches the schema. - Structure
<element>
: defines a group of<element>
or<attribute>
elements. - Link
<element>
: defines a link. This elements must include the 鈥淍type=link鈥 attribute. - XML
<element>
: defines a Text type 鈥渕Data鈥 field. This element must include the 鈥淍type=xml鈥 attribute.
Attribute description attribute-description-4
-
_operation (string): defines the type of writing in the database.
This attribute is mainly used when extending out-of-the-box schemas.
Accessible values are:
- 鈥渘one鈥: reconciliation alone. This means that 蜜豆视频 Campaign will recover the element without updating it or generating an error if it doesn鈥檛 exist.
- 鈥渋nsertOrUpdate鈥: update with insertion. This means that 蜜豆视频 Campaign will update the element or create it if it doesn鈥檛 exist.
- 鈥渋nsert鈥: insertion. This means that 蜜豆视频 Campaign will insert the element without checking whether it exists.
- 鈥渦pdate鈥: update. This means that 蜜豆视频 Campaign will update the element or generate an error if it doesn鈥檛 exist.
- 鈥渄elete鈥: deletion. This means that 蜜豆视频 Campaign will recover and delete elements.
-
advanced (boolean): when this option is activated (@advanced=鈥渢rue鈥), it lets you hide the attribute on the list of available fields accessible for configuring a list in a form.
-
aggregate (string): lets you copy the definition of an
<element>
via another schema. This attribute receives a schema declaration in the form of a 鈥渘amespace:name鈥. -
applicableIf (string): condition for applying the index. This attribute receives an XTK expression.
-
autopk (boolean): if this option is activated (autopk=鈥渢rue鈥), a unique key will be automatically defined. This option may only be used on the main element of the schema. Warning, 蜜豆视频 Campaign only guarantees that the key generated is unique. It is not guaranteed that the key values are consecutive and incremental.
-
dataPolicy (string): enables you to specify approval constraints on values allowed in the SQL field. The values for this attribute are:
- 鈥渘one鈥: no value
- 鈥渟martCase鈥: first letters upper case
- 鈥渓owerCase鈥: all lower case
- 鈥渦pperCase鈥: all upper case
- 鈥渆mail鈥: email address
- 鈥減hone鈥: telephone number
- 鈥渋dentifier鈥: identifier name
- 鈥渞esIdentifier鈥: file name
-
dbEnum (string): receives the internal name of a 鈥渃losed鈥 enumeration. The enumeration values must be defined in the
<srcschema>
. -
defOnDuplicate (boolean): if this attribute is activated, when a record is duplicated the default value (defined in @default) is automatically reapplied to the record.
-
default (string): lets you define element behavior (call to a function, default value). This attribute receives an XTK expression.
-
desc (string): lets you insert a description of the element. This description is used to understand what is the element and what it is being used for. You can display it in the form.
-
displayAsField (boolean): if this attribute is activated, a 鈥渓ink鈥 type
<element>
will be displayed as a field in the tree view of the schemas (鈥淪tructure鈥 tab). This way, it鈥檚 possible to display a link as a local field and change it behavior during a query. When the element is found in the SELECT of a query, the value of the link target will be used. When the element is found in the WHERE of a query, the underlying key of the link will be used. -
edit (string): this attribute specifies the type of input that will be used in the form linked to the schema.
-
enum (string): receives the name of the enumeration linked to the field. The enumeration can be inserted into the same schema or into a remote schema.
-
expr (string): this attribute defines a calculated field for which no definition is stored in the table. It receives an Xpath or an XTK (string) expression.
-
externalJoin (boolean): external join in a 鈥渓ink鈥 type element.
-
feature (string): defines a characteristics field: These fields are used for extending the data in an existing table, but with storage in an annex table. Accepted values are:
- 鈥渟hared鈥: the content is stored in a shared table per data type
- 鈥渄edicated鈥: the content is stored in a dedicated table
SQL characteristics tables are built automatically based on the characteristic type:
- dedicated:
Ft_[name_of_the_schema_containing_the_characteristic]_[name_of_the_characteristic]
- shared:
Ft_[type_of_key_of_the_schema_containing_the_characteristic]_[type_of_the_characteristic]
There are two types of characteristics fields: simple fields where a single value is authorized on the characteristic, and multiple choice fields, where the characteristic is linked to a collection element which may contain several values.
When a characteristic is defined in a schema, this schema must have a main key based on a single field (composite keys are not authorized).
-
featureDate (boolean): attribute linked to the 鈥淍feature鈥 characteristics field. If its value is 鈥渢rue鈥, it lets you find out when the value was last updated.
-
filterPath (string): this attribute receives an Xpath and lets you define a filter on a field.
-
folderLink (string): this attribute receives the name of the link that lets you recover the files containing entities.
-
folderModel (string): defines the type of folder which enables entity storage. This attribute is only defined if 鈥淍folderLink鈥 is present.
-
folderProcess (string): defines the link where entity model instances are stored. This attribute is only defined if 鈥淍folderLink鈥 is present.
-
fullLoad (boolean): this attribute forces the display of all records in a table during field selection in a form.
-
img (string): receives the path of an image linked to an element. The value of this attribute is of 鈥渘amespace:image name鈥 type. For example: img=鈥渃us:myImage.jpg鈥. Physically, the image must be imported to the application server.
-
integrity (string): referential integrity of the occurrence of the source table towards the target table.
Accessible values are:
- 鈥渄efine鈥: 蜜豆视频 Campaign does not delete the entity if it is referenced via the link
- 鈥渘ormal鈥: deleting the source occurrence initializes the keys of the link on the target occurrence (default mode), this type of integrity initializes all foreign keys
- 鈥渙wn鈥: deleting the source occurrence triggers the deletion of the target occurrence
- 鈥渙wncopy鈥: similar to 鈥渙wn鈥 (in case of deletion) or duplicates occurrences (in case of duplication)
- 鈥渘eutral鈥: does not do anything
-
label (string): element label.
-
labelSingular (string): label (singular form) of the element used in some parts of the interface.
-
length (string): max. number of characters authorized for a value of the 鈥渟tring鈥 type SQL field.
-
localizable (boolean): if it is activated, this attribute tells the collection tool to recover the value of the 鈥淍label鈥 attribute for translation (internal use).
-
name (MNTOKEN): internal name of the element which matches the name of the table. The value of the 鈥淍name鈥 attribute must be short, preferably in English, and comply with naming constraints linked to XML.
When the schema is written to the database, prefixes are automatically added to the field name by 蜜豆视频 Campaign.
- 鈥渋鈥: prefix for the 鈥榠nteger鈥 type.
- 鈥渄鈥: prefix for the 鈥榙ouble鈥 type.
- 鈥渟鈥: prefix for the character string type.
- 鈥渢s鈥: prefix for the 鈥榙ate鈥 type.
To define the name of the table in an autonomous way, you need to use the 鈥淍sqltable鈥 attribute in the definition of the main schema element.
-
noDbIndex (boolean): lets you specify that the element will not be indexed.
-
ordered (boolean): if the attribute is activated (ordered=鈥渢rue鈥), 蜜豆视频 Campaign keeps the element declaration sequence in an XML collection element.
-
pkSequence (string): receives the name of the sequence to be used for calculating an auto-incremental key. This attribute may only be used if an auto-incremental key is defined on the root element of the schema.
-
pkgStatus (string): during package exports, values will be taken into account as a function of the value of this attribute:
- 鈥渁lways鈥: the element will always be present
- 鈥渘ever鈥: the element will never be present
- 鈥渄efault (or nothing)鈥: the element is exported unless it is the default element or if it isn鈥檛 an internal field and would not be compatible with other instances
-
ref (string): this attribute defines a reference to an >element> element shared by several schemas (definition factoring). The definition isn鈥檛 copied into the current schema.
-
required (boolean): if this attribute is activated (@required=鈥渢rue鈥), the field is highlighted in the interface. The label of the field will be red in forms.
-
revAdvanced (boolean): when activated, this attribute specifies that the opposite link is an 鈥渁dvanced鈥 link.
-
revCardinality (string): this attribute defines the cardinality of a link between two tables. It is used in a 鈥渓ink鈥 type
<element>
.Possible values are:
- 鈥渟ingle鈥 : Simple 1-1 type link
- 鈥渦nbound鈥: 1-N type collection link
By default, if the attribute isn鈥檛 specified during link creation, cardinality will be 1-N.
-
revDesc (string): this attribute receives a description linked to the opposite link.
-
revExternalJoin (boolean): when activated, this attribute lets you force the external join on the opposite link.
-
revIntegrity (string): this attribute defines the integrity on the target schema. The same values as the 鈥淍integrity鈥 attribute are authorized. By default, 蜜豆视频 Campaign gives the 鈥渘ormal鈥 value to this attribute.
-
revLabel (string): label of the opposite link.
-
revLink (string): name of the opposite link. If the value is 鈥NONE鈥, no opposite link will be created in the destination schema.
-
revTarget (string): target of the opposite link.
-
sql (boolean): if this attribute is activated (@sql=鈥渢rue鈥), it forces storage of the SQL element, even if the element has the xml=鈥渢rue鈥 property.
-
sqlname (string): name of the field during table creation. If 鈥淍sqlname鈥 isn鈥檛 specified, the value of the 鈥淍name鈥 attribute is used by default. When writing the schema to the table, prefixes are added automatically depending on the type of field.
-
sqltable (string): for the main element of the schema, this attribute overloads the name of the SQL table generated by default. If 鈥淍sqltable鈥 isn鈥檛 specified, the default name will be structured like this: namespace (first letter upper case) followed by the value of the SrcSchema 鈥淍name鈥.
-
tableSpace (string): this attribute lets you specify a new data storing tablespace for a table (valid on the root
<element>
). -
tableSpaceIndex (string): this attribute lets you specify a new index storage tablespace for a table (valid on the root
<element>
). -
target (MNTOKEN): receives the name of the target schema when creating a link between tables. This attribute is only active for 鈥渓ink鈥 type elements.
-
template (string): this attribute defines a reference to an
<element>
element shared by several schemas. The definition is automatically copied into the current schema. -
translatedDefault (string): if a 鈥淍default鈥 attribute is found, the 鈥淍translatedDefault鈥 will enable you to redefine an expression to match the one defined in @default, to be collected by the translation tool (internal use).
-
translatedExpr (string): if a 鈥淍expr鈥 attribute is found, the 鈥淍translatedExpr鈥 attribute lets you redefine an expression matching the one defined in 鈥淍expr鈥, and which will be collected by the translation tool (internal use).
-
type (MNTOKEN): defines the type of data stored in the element.
List of available types:
- ANY
- bin
- blob
- boolean
- byte
- CDATA
- datetime
- datetimetz
- datetimenotz
- date
- double
- enum
- float
- html
- int64
- link
- long
- memo
- MNTOKEN
- percent
- primarykey
- short
- string
- time
- timespan
- uuid
-
unbound (boolean): if the attribute is activated (unbound=鈥渢rue鈥), the link is declared as a collection element for a 1-N cardinality.
-
userEnum (string): receives the internal name of an 鈥渙pen鈥 enumeration. Enumeration values can be defined by the user in the interface.
-
xml (boolean): if this option is activated, all values defined in the element are stored in XML in a TEXT type 鈥渕Data鈥 field. This means that there will be no filtering or sorting on these fields.
-
xmlChildren (boolean): forces storage for each child (
<element> or <attribute> ) of the <element> element in an XML document. </element> </attribute> </element>