Skip to main content

Form settings

FormField

The FormField is the generic definition of any user input field within the Form. Based on the configuration it represents a simple text input area, combo box or other UI elements.

Attributes

Attribute Mandatory Description Example
name yes Unique name of the form within the FormList (has to be written in UPPERCASE letters and must not contain any special characters). name="General"
authorization no Only users with the appropriate Role/Claim are authorized to view/process the element.
  • authorization="ROLE[ADMIN,EDITOR]"
  • authorization="CLAIM[WF_ADMIN,WF_EDIT]"
datatype yes The type of the data to visualize. Following datatypes are available:
  • date
  • datetime
  • guid
  • guidstring
  • number
  • string
  • timestamp
  • createtimestamp
  • createtimestampstring
datatype="string"
defaultvalue no Attribute can be used to set a value for:
  1. a non-persisted FormField
  2. to define a standard value for a FormField
This attribute can be generated in several ways:
Examples can be found here.
defaultvaluemode no Attribute can be used to define when defaultvalue is populated.
  1. onload: value populated when the form is opened
  2. onsave: value populated when the form is saved
defaultvaluemode="onload"
editable no Boolean value which defines, if the FormFields within the tab are editable. Default is "true".
  • editable="false"
  • editable="SCRIPT[...]"
  • editable="SESSION[KeyExists({SESSION.SELECTION})]"
  • editable="SQL[SELECT ... FROM ...]"
  • editable="OBJECT[...]"
filter no Filter to be used in a list view. If no operator is set, the default operator filter="ISEQUALTO" is used.
Available filters:
  • ISEQUALTO
  • ISNOTEQUALTO
  • ISLESSTHAN
  • ISGREATERTHAN
  • ISLESSTHANOREQUALTO
  • ISGREATERTHANOREQUALTO
  • ISLIKESTART
  • ISLIKEEND
  • ISLIKE
  • ISBETWEEN
filter="ISLIKE"
help no Help text describing the purpose / use of this field. help="Date till when the ..."
label no Label to show in the Form. label="Start date"
lov no More details can be found here. Examples can be found here.
maxlength no Defines the maximum input length for a FormField. The size of the FormField depends on the defined maxlength. maxlength="10"
override no Boolean value if it is set true the defaultvalue always replaces the value of the data record. Note: It only works if the field is defined as visible="false". override="true"
persisted no Boolean value which defines if the FormField should be stored to the data source or is only a temporary object for visualization. persisted="false"
required no Boolean value which defines if the FormField may contain NULL values or not.
  • required="true"
  • required="SESSION[...]"
saveinsession no Attribute to persist (after a submit) the actual FormField value in a session variable which can be referenced later (for example, from another Form). By defining saveinsession="true" it will be stored under "FORMNAME.FORMFIELDNAME" into the session. Alternative you can define your own name.
  • saveinsession="true"
  • saveinsession="MYCUSTOMNAME"
sqlselect no The attribute sqlselect should be used if the FormField is a non-persisted field and therefore not filled from the form table. While sqlselect is used to fill the FormField in the List-Controller, the defaultvalue is the corresponding statement in the Form-Controller.
SQL-statements (as well as parts of SQL-statements) can be used. There are several possibilities:
  • sqlselect="SQL[Select - statement]"
  • sqlselect="SQL[Column as XY]"
  • sqlselect="SQL[CASE-Statements]"
  • sqlselect="SQL[DECODE-Statements]"
  • sqlselect="SQL[Select (DESCRIPTION ||' '|| SUBDESCRIPTION) as TYPE FROM INCIDENTTYPE WHERE INCIDENTTYPE.ID = INCIDENT1.TYPE_ID]"
  • sqlselect="SQL[NAME as FIRSTNAME]"
  • sqlselect="SQL[CASE {FORM.COUNTRY} WHEN 'Germany' THEN 'de' WHEN 'Great Britain' THEN 'en' ELSE 'N/A']"
  • sqlselect="SQL[DECODE({FORM.COUNTRY},'Austria',1,0)]"
template no Defines which template should be used for the FormField representation. template="MyTextFieldTemplate"
type yes A FormField can receive the following types: autocomplete: database-driven element to generate a list of values after user input.
  • checkbox: elements to check or uncheck
  • combobox: convertible list of values
  • datepicker: defines a graphical selection of dates
  • filepicker: element to save files at the server
  • hyperlink: renders a link into the Form
  • image: element showing an image
  • label: element showing a label
  • textarea: multi-line input field
  • textfield: single-line input field
type="combobox"
validation no The validation of user input. More information can be found here. Examples can be found here.
validationmessage no Message to show when the validation of the field fails. validationmessage="The input must be numeric!"
visible no Defines the visibility of the field The result has to deliver true or false. More details can be found here. Examples can be found here.

Examples for attribute "defaultvalue"

  
<!-- Example for a non-persisted field: -->
<FormField ... defaultvalue="SQL[SELECT NAME FROM PERSON WHERE ID={FORM.PERSON_ID}" ... />

<!-- Examples for default values (e.g. to be used in empty forms) -->
<FormField ... defaultvalue="SQL[SELECT SYSDATE FROM DUAL]" ... />
<FormField ... defaultvalue="OBJECT[classname.methodname({SESSION.SELECTION})]" ... />
<FormField ... defaultvalue="Austria"... />

<!-- Examples for PLACEHOLDER usage: -->
<FormField ... defaultvalue="{FORM.AGENCY_ID}" ... />
<FormField ... defaultvalue="{RESSOURCE.BLUBB}" ... />
  

Example

  
<!-- Combox with a list of values -->
<FormField name="COUNTRY" label="Country:" type="combobox" datatype="string" lov="LIST[Austria;Germany;Switzerland]" />
    
<!-- Date picker -->
<FormField name="DATE" label="Date:" type="datepicker" datatype="date"  />
    
<!-- Input field for number with a default value of 20.  -->
<FormField name="COMMENT" label="Comment:" type="textfield" datatype="number" defaultvalue="20" />