Skip to main content

Form settings

FormTable

The FormTable is a specific implementation of a FormField representing a table within a Form. Columns within the FormTable are defined by FormTableField's.

In a FormTable you can also define FormAction's to maniplulate the content of the table.

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.
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[...]"
idfield no Definition of the primary key in the LoV statement. idfield="ID"
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[...]"
rowcount no Defines the number of lines which are shown in the table. If the number of records exceeds the rowcount, a pagination is added to the FormTable automatically. rowcount="10"
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.

NOTE: selectionmode="multiple" will store a coma separated string of the ID values. Otherwise, the actual ID value will be persisted in the SEC_SESSION table.
  • saveinsession="true"
  • saveinsession="MYCUSTOMNAME"
selectionmode no Defines how many items may be selected in a formTable. Possible values are:
  • none: no row may be selected (default value)
  • single: one row may be selected
  • multiple: many rows may be selected
selectionmode="none"
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.

Example

  
<FormTable name="COPYRIGHTGRID" label=" " datatype="string" idfield="ID" required="false" persisted="false" selectionmode="single"
                rowcount="8" lov="SQL[Select ID,NAME, COPYRIGHTTEXT From RPI_COPYRIGHT Order By UPPER(NAME)]"
                defaultvalue="SQL[Select COPYRIGHT_ID From RPI_COPYRIGHT_FEATURE Where FEATURE_ID = {FORM.Id}]">
  <FormTableField name="NAME" label="Name" width="150" />
  <FormTableField name="COPYRIGHTTEXT" label="Text" width="300" />
  <FormAction name="EditCopyright" label="Edit" action="SCRIPT[IG.openSimpleModalForm({form:'RPI_COPYRIGHT',id:{ROW.ID}, closeAction: 'reloadFields', closeActionParam:['COPYRIGHTGRID']})]" type="row" image="ig-icon-edit" />
</FormTable>