Field XML Definition

The following topics describe the XML elements that describe a field:

DataFieldDef Node

Element Name XML Element Type Data Type Description
DisplayLabel Node String The display label for this field.
Description Node String Description of this field.
Props Node Complex A set of field properties. See Field XML Definition for more information.
ValidationScript Node String A Base-64 encoded formula to validate this field.
ListItems Node Complex For SelectList and similar fields, a set of picklist items.
imageData Node String For SharedImage fields only, specifies a Base-64 encoded image.
id Attr int The ID for this field.
origID Attr int The original ID of this field.
objDefName Attr String The integration name of the object that contains this field.
columnName Attr String For external objects only, the database column name. This value is required.
fieldName Attr String The integration name of this field. This value is required and must be unique per object.
groupName Attr String The group name for this field.
dataName Attr String Name of the data type, which is ignored for new fields.
uiClass Attr String Specifies the UI type for this field. Required value, one of: TextInput, TextArea, DateInput, DateTimeInput, IntInput, CurrencyInput, DecimalInput, CheckBox, URLInput, EmailInput, PhoneInput, SelectList, SelectListMultiple, RadioButtons, CheckBoxesGroup, AutoNumber, FileInput, ImageInput, SharedImage, FormulaField, ExpressionField, IntegrationLink, TemplateField.
isRequired Attr Boolean Specifies whether a value must be entered for this field on all pages.
isReadOnly Attr Boolean Specifies whether the field is read-only on all pages in which it appears.
isTextIndexable Attr Boolean Specifies whether this field will be indexed for full-text search.
isAuditable Attr Boolean Specifies whether audit changes will be tracked for this field.
maxLength Attr Int Specifies the maximum number of characters allowed as input for text-based fields
addToPages Attr Boolean Specifies whether an API call to add a field definition should also add the newly created field to object pages.

Field Props Node

The following table describes elements of a FieldProps node:

Element Name XML Element Type Data Type Description
autoNumFormat Node String For AutoNum fields, the format. For example, PO# {YYYY}-{0000000} will be converted to a value such as PO# 2007-0000001
startingAutoNumber Node String For AutoNum fields, the number is used to initialize the current number.
Reviewers: is this a string or an int?
cols Node Int For TextArea fields, the number of columns.
decimalPlaces Node Int For DecimalInput fields, the number of decimal places.
defValue Node String Specifies a default value to be displayed for this field when new records are created.
fileMaxSize Node Int For FileInput fields, specifies the maximum size, in kilobytes, for uploaded files.
formatIndex Node Int For CurrencyInput fields, specifies a currency format index.
formula Node String For formula fields, specifies a Base-64 encoded formula.
hideLabel Node Boolean Specifies whether to hide the field display label on user interface pages.
inputMask Node String For TextInputfields, specifies an input mask.
inlineEdit Node Boolean Specifies whether this field can be edited on object view and edit pages.
isLocalized Node Boolean For text fields, specifies whether to support input in a different language.
isShared Node Boolean For SelectInput fields, specifies whether the values can be shared with other fields that provide multiple choices.
isUnique Node Boolean Specifies whether this field allows the same value in more than one record: a value of true, means duplicates will not be allowed.
isWarning Node Boolean Specifies whether validation errors should be considered as warnings, which can be ignored by the user.
isvShare Node Boolean For fields in an ISV account on the Master Server, specifies whether this field can be viewed and updated, if applicable, by ISV tenants.
linkTempl Node String For IntegrationLink fields, a Base-64 encoded template for the integration link.
lowerLabel Node String For CheckBox fields, specifies an additional label to render on the right side of the checkbox.
maxValue Node Int For numeric fields, the maximum value allowed.
minValue Node Int For numeric fields, the minimum value allowed.
publicAccess Node Boolean For FileInput and ImageInput fields, specifies whether to allow public access to uploaded resource without checking permissions.
returnType Node Int For FormulaField fields, specifies the return type. Available values are:
  • decimal number
  • currency
  • integer
  • string
  • boolean
  • date
  • date/time (adjusted to user's time zone)
  • date/time (not adjusted to user's time zone)
.
rows Node Int For TextArea fields, the number of rows.
separator Node String For DecimalInput fields, use this as a separator.
shiftCurrDate Node Int For DateInput fields, add this number of days to the current date.
size Node Int Specifies the size in number of characters for an HTML input box
sortABC Node Boolean For fields that allow selections, such as SelectList, specifies whether to sort picklist values in alphabetic order.
source Node String For fields that allow selections, such as SelectList, specifies the source name for picklist values.
template Node String For TemplateField fields, specifies a Base-64 encoded template.
useCurrDate Node Boolean For DateInput fields, specifies whether to use the current date as the default value.
useFullDate Node Boolean For DateInput fields, specifies whether to use the full text of the date on view pages.
useRichEditor Node Boolean For TextArea fields, specifies whether a Rich Text Editor will be available to enter text.
valFalse Node String Clears the value for TRUE (CheckBox fields, External Objects)
valTrue Node String Sets the value to TRUE (CheckBox fields, External Objects)
vertical Node Boolean For fields that have multiple lines, such as checkboxes and radio buttons: if true, align controls vertically; if false, align horizontally.
viewWidth Node String The width for this field in a view, in pixels or %.

Field Definition Example

The following example shows how to use a DataFieldDef node to specify a field definition.

Copy
<DataFieldDef objDefName="a1" columnName="STR0" fieldName="my_text2" 
 dataName="FieldString" uiClass="TextInput" isRequired="yes" isReadOnly="no" 
 isTextIndexable="yes" isSystem="no" isAuditable="yes" maxLength="0">
<DisplayLabel>My Text</DisplayLabel>
<Props>
<isLocalized>false</isLocalized>
<caseInsensitive>true</caseInsensitive>
<excludePicklistAddition>true</excludePicklistAddition>
<isUnique>true</isUnique>
</Props>
</DataFieldDef>

List Item Node

 

Element Name XML Element Type Data Type Description
id Attr int The item ID.
origId Attr int The original ID of the list item.
orderNo Attr int Required sequential order in the list for this item.
source Attr String Required name to distinguish this group of items.
name Attr String Specifies the display name for this list (required).
code Attr String Specifies the integration code for this list.
mainItemId Attr int For dependent picklists, specifies the ID of the main item.
isDefault Attr Boolean Specifies whether this list item is the default for new records.

List XML example

The following example shows a ListItem node.

Copy
<ListItem id="20535" origId="20535" orderNo="5" source="20529" 
   name="ZZZ" code="z" mainItemId="-1" isDefault="no"/>