Skip to main content

Form settings

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.

Example of FromAction in a FormTable to delete or edit an entry.

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"
action no The definition of what should be done when the button is clicked.
  • Predefined actions:
    • Form/Save (save)
    • Form/Delete (delete)
    • Form/Index (Form)
    • List/Index (List)
    • List/Select
    • Workflow/Index
  • Standard JavaScript actions:
    • SCRIPT[IG.trigger({...})]
    • SCRIPT[IG.openModalForm({...})]
  • Custom JavaScript
Examples can be found here.
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]"
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[...]"
help no Help text describing the purpose / use of this field. help="Deletes the record from the list ..."
image no Defines an image for the FormAction. image="icon-add.png"
label no Label to show in the Form. label="Start date"
submit no Submit-Parameter for the FormAction; if not set explicitly, the defaultvalue is submit="false", which references a HTTP-GET Request. If submit="true", the HTTP-POST Request is used. submit="true"
type no Defines the display-type of the FormAction. Available options:
  • field
  • form
  • row
type="row"
visible no Defines where the FormAction-element will be visible. Possible values:
  • visible="list" - the button will be visible in the list-page (preceding the form-page)
  • visible="list" type="row" - an edit button will be visible in each row of the list-page (preceding the form-page)
  • visible="form"
  • visible="hidden"
visible="form"

Example

  
<!-- Add a button to each FormTable frow to delete it from the list -->
<FormAction name="DeleteProject" label="DeleteProject" action="Form/Delete" visible="list" type="row" image="ig-icon-delete"/>

<!-- Redirect the workflow to a dedicated workflow node by using a JavaScript -->
<FormAction name="REDIRECT" label="Neue Aktion" action="SCRIPT[IG.navigate(10)" visible="list" />

<!-- Redirect the workflow to a dedicated workflow node by using a FormAction parameter -->
<FormAction name="REDIRECTPARAM" label="Neuer Parameter" action="Form/Index" visible="form">
	<Param name="nodeid" value="4041" />
</FormAction>
  

Param

A Param represents a key value pair to pass parameters to a FormAction.

Attribute Mandatory Description
name yes name of the parameter
value yes value of the parameter
  
<param name="myKey" value="myValue">
  

Capture Geometries in M.App Enterprise

The following JavaScript code is necessary in order to capture geometries in M.App Enterprise via Workflows.
This is just an example:
SC.digitize('BuildingExtension', {commands: ['NEWPOLYGON'], startOnLoad: 'NEWPOLYGON'}) with:
  • SC.digitize - Digitize command
  • 'BuildingExtension' - LayerName in ' '
  • {commands: - which commands should be executed. In this case, there should be a new polygon digitized. The following list shows all available NEW digitizing commands:
    • NEWPOINT
    • NEWTEXT
    • NEWPOLYLINE
    • NEWPOLYGON
    • NEWRECTANGLE
  • startOnLoad - specifies the digitize command which is automatically activated
  • textField: - specifies the database column, that holds the text value (only required if there is at least one text command)
  • rotationField: - specifies the database column, that holds the rotation value
and there are some commands for the EDIT command of existing geometries:
  • Redo
  • Reset
  • Rotate
  • Save
  • SplitSurface
  • SplitCurve
  • SubtractFromSurface
  • Undo
  • Copy
  • Delete
  • RemoveFromCollection
  • RemoveInteriorRing
  • JoinToCollection
  • MergeSurfaces
  • MergeCurves
  • Modify
  • ModifyText
  • Move
  • NewCurve
  • NewArcByCenter
  • NewArcByThreePoints
  • NewCircle
  • NewSurface
  • NewPoint
  • NewPolygon
  • NewLineString
  • NewRectangle
  • NewText
For example an edit action can look like:
SC.digitize('BuildingExtension', {commands: ['MODIFY'], startOnLoad: 'MODIFY'}, [{FORM.id}])
where you may have to replace id in FORM.id, because the id field in your database is named differently.
⚠️
The following example only works if you want to rotate point geometries. If you want to rotate polygons or polylines the rotation is automatically done and stored
SC.digitize('PointLayer', {commands: ['GE_ROTATE'], startOnLoad: 'GE_ROTATE', rotationField: 'rotation'}, [{FORM.id}])
where rotation is your database column, where the value should be stored.
⚠️
In order to see the rotated points in your map, you also have to define a style, where you set the rotation to the corresponding field of the database