Form
Introduction
A Form defines the data model of available elements in one step in the workflow. How the data are represented or if only one or multiple records are visualized to the user is defined by the Controller. While a FormController will always render a single (new or existing) record, a ListController will view one or multiple records as a table / list.
By default a Form is a representation of a table or view in the database where the FormFields represent the column within this table. By using the Workflows .NET API, a Form could also represent a webservice endpoint or any other interface.
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="CHECKLIST" |
table | no | Defines the table, which is the base for your FormFields. So the value for table has to be the same as in the database. | table="CHECKLIST" |
idfield | no | Defines the primary key column of the table used to reference the respective lines with (has to be written in UPPERCASE letters and must not contain any special characters). | idfield="ID" |
customscript | no | Definition of an external script source. | customscript="myScripts/validator.js" |
customstyle | no | Definition of an external style source. Automatically the folder Custom\Styles is choosen. So you only have to define the name of the customstyle. | customscript="myStyle.css" |
editable | no | Boolean value which defines if the form is editable. | Please find details here |
filter | no | Indicates the WHERE-clause of the view. Mainly used by the ListController. | filter="SQL[INCIDENT_ID ={SESSION.INCIDENT1.RPI_ID}]" |
inherits | no | Defines that the form is derived from another one (has to be written in UPPERCASE letters and must not contain any special characters). This saves redundant work and should be used if similar forms are derived from a root-form. | inherits="MYBASEFORM" |
isfilterareaopen | no | Defines if the filter area above a List-Controller should be initially open (default="false"). | isfilterareaopen="true" |
label | no | Label of the form. | label="Create New Incident" |
order | no | Indicates the column to arrange the view, parameter ASC (ascending=default), and DESC (descending). Primarly used by ListController.(See SQL command ORDER BY) | order="SQL[Order By TEXT ASC]" |
pagesize | no | Defines the number of list lines per form. If this attribute is set, four pagination buttons (first page, previous page, next page, last page) are added automatically to the ListController page. | pagesize="15" |
Examples for the attribute editable:
<!-- standard boolean values -->
<Form ... editable="false" ... >
<!-- execute a script returning a boolean -->
<Form ... editable="SCRIPT[...]" ... >
<!-- check if a value is stored into the session -->
<Form ... editable="SESSION[KeyExists ({SESSION.SELECTION})]" ... >
<!-- excecute an SQL statement returning a boolean or 0/1 -->
<Form ... editable="SQL[SELECT CASE TYPE WHEN 'Normal' THEN 1 ELSE 0 END FROM TABLE1
WHERE ID={FORM.ID} ...]" ... >
<!-- custom .NET Object returning a boolean -->
<Form ... editable="OBJECT[...]" ... >