Declaring or updating metadata fields
When declaring a new field, the field type must be specified.
Before you begin
You should take into account the naming conventions. Make sure that you give an uppercase name to the name of the field and that it starts with an F, such as FDEPARTMENT and FMANUALTYPE in the scripts as shown below. Also make sure you provide a valid label.
Example type typestring
The following script creates a field in the database with the name 'FDEPARTMENT' and can contain values of the type typestring.
The minimum number of values is specified in the element minnoofvalues. Using '0' indicates that the field is optional. Using '1' indicates that the field is required.
The maximum number of values is specified in the element maxnoofvalues. Using '1' indicates that the field can contain at most one value. Using any other number will limit the number of values to that number. Using '999999' indicates that the number of values is not limited.
The attribute INDEX is only required if you want to be able to search on that field within Search. The attributes NEW, MODIFY and DOCUMENT are mandatory.
The other elements and values should be taken over as in the example because they are required by the TriDK database.
<tridk:setup xmlns:tridk="urn:trisoft.be:Tridk:Setup:1.0" xml:lang="EN">
<tridk:fields>
<tridk:field tridk:element="FDEPARTMENT">
<tridk:displaydefinition>
<tridk:label>Department Name</tridk:label>
<tridk:description/>
</tridk:displaydefinition>
<tridk:typedefinition>
<tridk:typestring>
<tridk:valuedefinition>
<tridk:caseinsensitive tridk:value="yes"/>
<tridk:accentinsensitive tridk:value="yes"/>
<tridk:skipspace tridk:value="yes"/>
<tridk:skipchars tridk:charlist=""/>
</tridk:valuedefinition>
<tridk:minnoofvalues tridk:value="1"/>
<tridk:maxnoofvalues tridk:value="1"/>
</tridk:typestring>
</tridk:typedefinition>
<tridk:public tridk:value="yes"/>
<tridk:system tridk:value="no"/>
<tridk:classdefinition>
<tridk:class tridk:element="NEW"/>
<tridk:class tridk:element="MODIFY"/>
<tridk:class tridk:element="DOCUMENT"/>
<tridk:class tridk:element="INDEX"/>
</tridk:classdefinition>
</tridk:field>
</tridk:fields>
</tridk:setup>
The following script will create a field in the database with the name FTRANSLATIONDUEDATE and can contain values of the type typedate.
The other elements and values should be taken over as in the example because they are required by the TriDK database.
<tridk:setup xmlns:tridk="urn:trisoft.be:Tridk:Setup:1.0" xml:lang="EN">
<tridk:fields>
<tridk:field tridk:element="FTRANSLATIONDUEDATE">
<tridk:displaydefinition>
<tridk:label>Translation Due Date</tridk:label>
<tridk:description/>
</tridk:displaydefinition>
<tridk:typedefinition>
<tridk:typedate>
<tridk:minnoofvalues tridk:value="0"/>
<tridk:maxnoofvalues tridk:value="1"/>
</tridk:typedate>
</tridk:typedefinition>
<tridk:public tridk:value="yes"/>
<tridk:system tridk:value="no"/>
<tridk:classdefinition>
<tridk:class tridk:element="NEW"/>
<tridk:class tridk:element="MODIFY"/>
<tridk:class tridk:element="DOCUMENT"/>
</tridk:classdefinition>
</tridk:field>
</tridk:fields>
</tridk:setup>
The following script will create a field in the database with the name FMANUALTYPE that can contain a list of values. The name of the LOV is specified in an attribute. In this case it is using the LOV DMANUALTYPE.
The other elements and values should be taken over as in the example because they are required by the TriDK database.
<tridk:setup xmlns:tridk="urn:trisoft.be:Tridk:Setup:1.0" xml:lang="EN">
<tridk:fields>
<tridk:field tridk:element="FMANUALTYPE">
<tridk:displaydefinition>
<tridk:label>Manual Type</tridk:label>
<tridk:description/>
</tridk:displaydefinition>
<tridk:typedefinition>
<tridk:typelov tridk:element="DMANUALTYPE">
<tridk:minnoofvalues tridk:value="0"/>
<tridk:maxnoofvalues tridk:value="1"/>
</tridk:typelov>
</tridk:typedefinition>
<tridk:public tridk:value="yes"/>
<tridk:system tridk:value="no"/>
<tridk:classdefinition>
<tridk:class tridk:element="NEW"/>
<tridk:class tridk:element="MODIFY"/>
<tridk:class tridk:element="DOCUMENT"/>
<tridk:class tridk:element="INDEX"/>
</tridk:classdefinition>
</tridk:field>
</tridk:fields>
</tridk:setup>
The following script will create a field in the database with the name FGRAMMARREVIEWER that can contain the name of a user. This is expressed by the element memberdefinedoncard. When the Field is assigned to a card type, there will have to be a reference the user
The other elements and values should be taken over as in the example because they are required by the TriDK database.
<tridk:setup xmlns:tridk="urn:trisoft.be:Tridk:Setup:1.0" xml:lang="EN">
<tridk:fields>
<tridk:field tridk:element="FGRAMMARREVIEWER">
<tridk:displaydefinition>
<tridk:label>Grammar Reviewer</tridk:label>
<tridk:description/>
</tridk:displaydefinition>
<tridk:typedefinition>
<tridk:typecardreference>
<tridk:memberdefinedoncard tridk:value="no"/>
<tridk:minnoofvalues tridk:value="0"/>
<tridk:maxnoofvalues tridk:value="1"/>
</tridk:typecardreference>
</tridk:typedefinition>
<tridk:public tridk:value="yes"/>
<tridk:system tridk:value="no"/>
<tridk:classdefinition>
<tridk:class tridk:element="NEW"/>
<tridk:class tridk:element="MODIFY"/>
<tridk:class tridk:element="DOCUMENT"/>
<tridk:class tridk:element="INDEX"/>
</tridk:classdefinition>
</tridk:field>
</tridk:fields>
</tridk:setup>