From GeoMedia Smart Client
Jump to: navigation, search
Settings WorkflowSetting FormSetting CommonSetting

The FormField element is a central element of HTML-Workflows and is used for the input of user data.


Attribute Mandatory Description
name yes Unique name (inside the form) of the FormField which corresponds to the column-name of the table.
 <FormField ... name="DESCRIPTION" .../>
authorization no Only users with the appropriate Role/Claim are authorized to view/process the element.

 <FormField ... authorization="ROLE[ADMIN,EDITOR]" ... />
 <FormField ... authorization="CLAIM[WF_ADMIN,WF_EDIT]" ... />
datatype no
  • date
  • datetime
  • guid
  • guidstring
  • number
  • string
  • timestamp
  • createtimestamp
  • createtimestampstring

 <FormField ... datatype="string" ... />
defaultvalue no Attribute can be used to set a value for:

a) a non-persisted FormField or b) to define a standard value for a FormField This attribute can be generated in several ways:

  • defaultvalue="SQL[...]"
  • defaultvalue="OBJECT[...]"
  • defaultvalue="text"
  • defaultvalue="{PLACEHOLDER}"

ad a)

 <FormField ... defaultvalue="SQL[SELECT NAME FROM PERSON WHERE ID={FORM.PERSON_ID}" ... />

ad b)

 <FormField ... defaultvalue="SQL[SELECT SYSDATE FROM DUAL]" ... />
 <FormField ... defaultvalue="OBJECT[classname.methodname({SESSION.SELECTION})]" ... />
 <FormField ... defaultvalue="Austria"... />


 <FormField ... defaultvalue="{FORM.AGENCY_ID}" ... />
 <FormField ... defaultvalue="{RESSOURCE.BLUBB}" ... />
defaultvaluemode GMSC 2014 no Attribute can be used to define when defaultvalue is set.
  • onload
The defaultvalue is set when form is loaded.
  • onsave
The defaultvalue is set when form is saved.
editable no Boolean value which defines if the form is editable:
  • editable="true"
  • editable="SCRIPT[...]"
  • editable="SESSION[KeyExists(...)]"
  • editable="SQL[...]"
  • editable="OBJECT[...]"

 <FormField ... editable="false" ... />
filter no If no filter="..." operator is set, the default operator filter="ISEQUALTO" is used.

 <FormField ... filter="ISEQUALTO" ... />
 <FormField ... filter="ISNOTEQUALTO" ... />
 <FormField ... filter="ISLESSTHAN" ... />
 <FormField ... filter="ISGREATERTHAN" ... />
 <FormField ... filter="ISLESSTHANOREQUALTO" ... />
 <FormField ... filter="ISGREATERTHANOREQUALTO" ... />
 <FormField ... filter="ISLIKESTART" ... />
 <FormField ... filter="ISLIKEEND" ... />
 <FormField ... filter="ISLIKE" ... />
 <FormField ... filter="ISBETWEEN" ... />

For further information about filtering, refer to List-Controller Filters.

help no Help text for the FormField.

 <FormField ... help="Do not use special characters here!" ... />
label no Label for the FormField displayed in Workflow-Form.

 <FormField ... label="Emergency Organisation:" ... />
lov no Element for List-of-Values which should be used in the FormField. The LOV can be generated in several ways (makes sense only in context with certain types, like type="combobox"):
  • lov="SQL[...]"
  • lov="LIST[name1=value1;name2=value2;...]"
  • lov="OBJECT[...]"

 <FormField ... lov="LIST[black=schwarz;blue=blau;red=rot]" ... />
 <FormField ... lov="OBJECT[...]" ... />
maxlength no Defines the maximum input length for a FormField. The size of the FormField depends on the defined maxlength.

 <FormField ... maxlength="10" ... />
override no Boolean value. If it is set true the defaultvalue always be overriding the value of the database.

<FormField ... override="true" />

Blue.pngoverride only works if visible = false

persisted no Boolean value which defines if the FormField can be stored inside the actual table.

 <FormField ... persisted="false" ... />
required no Boolean value which defines if the FormField may contain NULL values or not. The attribute can be generated in several ways:
  • required="true"
  • required="SESSION[...]"

 <FormField ... required="false" ... />
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), for example,:

saveinsession="FORMNAME.FORMFIELDNAME" or set saveinsession="true". This variable will be stored in the SEC_SESSION table.

 <FormField ... saveinsession="ACTIVE_TASK.STATUS_ID" ... />
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]"

 <FormField ... sqlselect="SQL[Select (DESCRIPTION <nowiki>||' '||</nowiki> SUBDESCRIPTION) 
 <FormField ... sqlselect="SQL[NAME as FIRSTNAME]" ... />
 <FormField ... sqlselect="SQL[CASE {FORM.COUNTRY} WHEN 'Germany' THEN 'de' 
WHEN 'Great Britain' THEN 'en' ELSE 'N/A']" ... />
 <FormField ... sqlselect="SQL[DECODE({FORM.COUNTRY},'Austria',1,0)]" ... />
template no Defines which template should be used for the FormField representation.

 <FormField ... template="MyTextFieldTemplate" ... />
type no 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
  • hyperlink
  • image: element showing an image
  • label: element showing a label
  • textarea: multi-line input field
  • textfield: single-line input field

 <FormField ... type="combobox" ... />
validation no The validation of user input can be done at runtime using the following methods:
  • validation="SCRIPT[...]"
  • validation="OBJECT[...]"
  • validation="SQL[...]"

As a result, either of these methods must deliver true or false (1/0).

 <FormField ... validation="SCRIPT[...]" ... />
 <FormField ... validation="OBJECT[classname.methodname({SESSION.SELECTION})]" ... />
 <FormField ... validation="SQL[SELECT DECODE(COUNT(*),0,1,0) FROM PR_UNIT WHERE PR_ID={FORM.PR_ID}]" ... />
validationmessage no You can define your own error message and has to be defined if there is an server side validation.
visible no Sets the visibility of the FormField and defines in which workflow elements the FormField should be used/visible:
  • visible="false"
  • visible="SESSION[KeyExists(...)]"
  • visible="SCRIPT[...]"
  • visible="list,form,filter"
  • visible="filter"
  • visible="hidden"
  • visible="OBJECT[...]"
Blue.pngMultiple visible="filter" definitions of various FormFields are concatenated with "AND".

 <FormField ... visible="false" ... />

the visible="filter" setting can be used according to the OGC-compliant definition: visible="form[SCRIPT[IG.hasValue('ISDEFAULT')]]"

Blue.pngDatatype="autocomplete" references itself and needs a LOV (="List of Values") containing a dependency on its own; at least three keyboard entries have to be done for the autocomplete function to execute.

<FormField name="FBGROUP" label="Firebrigade-Group:" type="autocomplete" datatype="string" lov="SQL[SELECT ... FROM ... WHERE S_NAME LIKE {FORM.FBGROUP} + '%']" persisted="false" maxlength="20" required="false"/>

With a LoV, you can select data or specify fixed values, for example, from a database. You can use a LoV for all list elements (FormField type="combobox ", FormTable type="table"). The following definitions are possible for a LoV:

  • Fixed values: The values will be defined fixed in the form.
  • Methods of Objects: The values will be defined by the method of an object.
  • SQL-Statement: The values will be selected from a table.

Example 1: Definition of a LoV with fixed values (key and displayed value are identical

In the following definition, the key (value which will be registered in the database) and the displayed value are identical.

 <FormField name="COUNTRY" label="Country:" type="combobox" datatype="string" lov="LIST[Austria;Germany;Switzerland]" />

Example 2: Definition of a LoV with fixed values (key and displayed value are different

In the following definition, the key and the displayed value are different. In this way, the value 1 will be registered for Austria, value 2 for Germany, and so on, in the database.

 <FormField name="COUNTRY" label="Country:" type="combobox" datatype="string" lov="LIST[1=Austria;2=Germany;3=Switzerland]" />

Example 3: Definition of a LoV using SQL-Statements

In the following definition, a LoV value is needed to store the form (required="true"); the column "COUNTRY" is part of the table "COUNTRY_TABLE", which is used in the superior form (therefore the ID-column is part of the lov-query).

 <FormField name="COUNTRY" label="Country:" type="combobox" datatype="string" lov="SQL[SELECT ID, NAME FROM COUNTRY_TABLE]" />

Example 4: Usage of datatype "datetime" and a "Now"-functionality

The datatype "datetime" is used for Oracle-DATE datatypes in combination with the fieldtype "datepicker", which enables the user to select a date out of a date-widget (the time has to be entered manually). If the datetime should be set semi-automatically, a "NOW"-button can be defined:

 <FormField label="Start:" name="STARTTIME" datatype="datetime" required="false" type="datepicker" visible="form,list">
        <FormAction name="NOW" label="Jetzt" action="SCRIPT[IG.setDateTimeToNow('STARTTIME')]" image="ig-icon-time" />

Language: English