Skip to main content

Form settings

General

Introduction

The forms enable the user to inspect, create, or edit data. While the Workflow-XML mainly defines the logical structure of the HTML-Workflow, the Form-XML defines the user-interaction through the GUI-definition.

The validation of the user input is done on two sides. Validation of the user input in FormFields can be handled through client-side scripting (for example, JavaScript), which can be done for a certain FormField when focus is lost. But the user-input is also always validated at the server-side.

The definition of all forms occurs by using an XML-File, which should be stored at the following path:

..\Workflows\FormSettings

As an example we create a "MyNewProject.xml" in this directory.

💡
The files in the WorkflowSettings and FormSettings directories need to be named equally.

Relation between the distinct hierarchical layers

FormList

Root element of the Form-XML has to appear only once.

Child element Cardinality
Include 0 .. n
Form 0 .. n
FormList
The element FormList is the root element of the Form.xml. It has no attributes, but it can have none or any number of child elements of the type Form, and it can have one or any number of child elements of the type Include. Example: <FormList> ... </FormList>

Include

Container element for the inclusion of external Form-XML files.

Include
To avoid implementing recurring forms (for example, search forms) in every file or to get a better overview of the forms, you can define a form which can be reused in several files. You can import further definition files with the key word Include. Example: <FormList> <Include file=“Template.xml”

Form

Element used for the creation of a form.

Child element Cardinality
FormAction 0 .. n
FormFilter 0 .. n
FormTab 1 .. n
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,

FormFilter

Element used to specify the FormFilter for the List-Controller.

FormFilter
The FormFilter element is used to offer predefined filters as a combobox in the filter area of the ListController. Attributes Attribute Mandatory Description Example name yes Unique name of the FormFilter within the form (has to be written in UPPERCASE letters and must not contain any special characters). name=“TODAYFILTER”

FormTab

Element used for the generation of a tabulator in a form.

Child element Cardinality
FormGroup 1 .. n
FormAction 0 .. n
FormTab
The FormTab element is used for the definition of tab elements in the user interface. FormTabs group input forms with different aspects of a workflow so that the user can switch between these tabs to administer the data. Workflow-Actions (SAVE, DELETE, ...) are performed for all FormTabs together. The FormTabs will

FormGroup

Element used for the grouping of FormFields inside the form.

Child element Cardinality
FormAction 0 .. n
FormField 1 .. n
FormFile 0 .. n
FormSingleRow 0 .. n
FormTable 0 .. n
FormGroup
The FormGroup element is used for the visual grouping of FormFields inside a form. The area on the left displays the name of the FormGroup and is used for the definition of FormFields; the area on the right can be used for further help text. Attributes Attribute Mandatory Description Example

FormFile

Element used for the generation of File-upload-UI and File-download-UI in a form.

FormSingleRow

Element used to display multiple FormField's in one row.

Child element Cardinality
FormField 1 .. n
FormSingleRow
The FormSingleRow element is used for the generation of several (usually two) FormFields in a single row. The default length of a FormField inside a FormSingleRow is half the length of the FormField (not enclosed in a FormSingleRow). To render the enclosed FormFields correctly, the maximum length of the shorter

FormField

Element representing a data field in a form.

Child element Cardinality
FormAction 0 .. n
FormField
The FormField element is a central element of Workflows and is used for the input of user data. 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

FormTable

Element used for the visualization of a table within a form.

Child element Cardinality
FormAction 0 .. n
FormTableField 1 .. n
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

FormTableField

Element representing a column in a FormTable.

FormTableField
The FormTableField is used within a FormTable to define and describe the columns. 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” label no Label to show in

FormAction

Element representing an action (= button) in a Form.

Child element Cardinality
Param 0 .. n
FormAction
The FormAction element is used for the integration of buttons inside a Form or FormTable. Parameters for the action can be defined by using the Param child. Attributes Attribute Mandatory Description Example name yes Unique name of the form within the FormList (has to be written in UPPERCASE letters and

Param

Element used for the definition of additional FormAction parameters.

FormAction
The FormAction element is used for the integration of buttons inside a Form or FormTable. Parameters for the action can be defined by using the Param child. Attributes Attribute Mandatory Description Example name yes Unique name of the form within the FormList (has to be written in UPPERCASE letters and

Example for FormSettings.xml

  
<?xml version="1.0" encoding="utf-8"?>
<FormList>
	<Form name="RPI_PUBLISHORDER" table="RPI_PUBLISHORDER" idfield="ID" pagesize="20" order="PUBLISHSTARTDATE DESC">   
		<FormTab name="RPI_PUBLISHORDER_Tab">
			<FormGroup name="RPI_PUBLISHORDER_Group">
				<FormField name="ID" label="Publishorder ID:" type="textfield" datatype="guidstring" required="false" visible="hidden"/>
				<FormSingleRow name="NameSR" template="FormSingleRowMiddleTemplate">
					<FormField name="NAME" label="Name:" type="textfield" datatype="string" required="false" visible="list,form,filter" 
						maxlength="64" editable="false" filter="SQL[UPPER(NAME) LIKE UPPER(dbo.STRINGJOIN('','%',{FILTER.NAME},'%',NULL)]"/>
					<FormField name="OWNER" label="Owner:" type="textfield" datatype="string" required="false" visible="list,form,filter" 
						editable="false" filter="SQL[UPPER(OWNER) LIKE UPPER(dbo.STRINGJOIN('','%',{FILTER.OWNER},'%',NULL)]"/>
				</FormSingleRow>
				...
			</FormGroup>
			<FormGroup name="PublishFeature_Group" label="Select Features">
				<FormTable name="FEATUREGRID" label=" " idfield="ID" multiselect="true" datatype="string"
					type="table" rowcount="5" required="false" persisted="false" 
					lov="SQL[SELECT ID,NAME FROM RPI_FEATURE WHERE ID IN (SELECT FEATURE_ID FROM
					RPI_THEME_FEATURE WHERE THEME_ID={FORM.THEME_ID}) 
					AND ID NOT IN (SELECT FEATURE_ID FROM RPI_PUBLISHORDER_FEATURE WHERE PUBLISHORDER_ID={FORM.ID})
					ORDER BY UPPER(NAME)]" editable="SCRIPT[IG.hasValue('ALLOWEDIT')]">
					<FormTableField name="NAME" label="Feature" width="400"/>
					<FormAction name="TriggerPublishFeatures" label="Assign Feat." editable="SCRIPT[IG.hasValue('ALLOWEDIT')]"
						action="SCRIPT[IG.trigger({triggerName:'TriggerPublishFeatures',reloadFields:['PUBLISHFEATUREGRID','FEATUREGRID']})]"
						help="Assign selected Features to Publish-Order"/>                   
				</FormTable>             
			</FormGroup>                         
			...
		</FormTab>  
		<FormAction name="NewPO" label="New Publish" action="SCRIPT[IG.navigate(10230)]" visible="list" />                                                                
	</Form>
</FormList>