In the graphical form editor, you can easily create new forms using drag-and-drop and extend objects with application-specific properties without requiring any programming knowledge. You can either add a form to an existing object (shown in the properties of the object), or you can directly create objects based on a form.
Useful for Following Tasks |
---|
|
Essential information about forms can be found in the user help:
Objective |
---|
The “Development” department needs to structure their technical documents based on their own classification scheme. The following metadata should be available:
|
To achieve the objective, proceed as follows:
Objective |
---|
The “Sales” department needs to compare the profit with the projected profit for each sales region. In addition, a chart is needed to visualize the number of contracts based on their states. |
To achieve the objective, proceed as follows:
Visualize the Profit for Each Sales Region
Visualize Contracts Based on Their State
To apply some logic or dynamic behavior to the fields, Fabasoft app.ducx expressions can be used.
When you hover over a user-defined field in the form editor, the “Edit” button is displayed. Click it to edit the field, then click the “Advanced” or “Display” tab. Here you can enter the desired Fabasoft app.ducx expression logic.
The following expressions can be defined in the context of forms:
Form: Prepare Commit Configuration
Defines an app.ducx expression that is called when the object is prepared for the commit of the transaction (see also FSCUSERFORMS@1.1001:pccgexpr: new window).
Form Page: Compute Visibility of Page
Defines a Fabasoft app.ducx expression that computes the visibility of a form page (see also COOATTREDIT@1.1:formpagevisibleexpr: new window). Click the “Edit” button of the form page itself, then define the desired expression.
Example |
---|
// the page is not shown in explore mode (widget in the content area) |
Compute Visibility of Field
Defines a Fabasoft app.ducx expression that computes the visibility of a property (see also COOSYSTEM@1.1:attrvisibleexpr: new window).
Note: Specified field widths are always considered. This can result in gaps if several fields are defined in a line and one or more of them are hidden by visible expressions.
Example |
---|
// the field is only shown if it contains a value |
Compute Value of Field
Defines a Fabasoft app.ducx expression that computes the value of a property (see also COOSYSTEM@1.1:attrvalueexpr: new window). A property with a Fabasoft app.ducx expression for computing its value is always displayed as read-only in the user interface.
Example |
---|
// FSCUSERFORMS@1.1001:GetFieldValue is used to read the the index of |
Handle Initialization of Field
Defines a Fabasoft app.ducx expression that computes the initialization value of a property (see also COOSYSTEM@1.1:attrinitexpr: new window).
Example |
---|
// object property: when creating an object the initial value will be an |
Compute Changeability of Field
Defines a Fabasoft app.ducx expression that computes the changeability of a property (see also COOSYSTEM@1.1:attrchangeableexpr: new window).
Example |
---|
// the field can only be edited when the object is created |
Filter Values
Defines a Fabasoft app.ducx expression that specifies the selectable values of a property (see also COOSYSTEM@1.1:attrfilterexpr: new window).
Example |
---|
// it is assumed that there is an object list with programming |
Filter Values Within Search
Defines a Fabasoft app.ducx expression that specifies the selectable values of a property in context of a search (see also COOSYSTEM@1.1:attrsearchfilterexpr: new window).
Handle Changes of Values
Defines a Fabasoft app.ducx expression that handles the change of a value of a property in the user interface (see also COOSYSTEM@1.1:attruichangeexpr: new window).
Example |
---|
// the integer property "days" is set, if the date properties change and |
Compute Whether the Property Must Be Defined
Defines a Fabasoft app.ducx expression that computes whether the property must contain a value (see also COOSYSTEM@1.1:attrmustbedefexpr: new window).
Example |
---|
// it is assumed that there is an integer property "importance" |
Validate Value
Defines a Fabasoft app.ducx expression that validates a changed value of a property in the user interface (see also COOSYSTEM@1.1:attrvalidateexpr: new window).
Example |
---|
// if the value of the float property is lower than 0, an error is shown |
Handle Reading of Field
Defines a Fabasoft app.ducx expression that is called before the value of the property is read (see also FSCUSERFORMS@1.1001:attrgetexpr: new window).
Handle Saving of Field
Defines a Fabasoft app.ducx expression that is called before saving the value of the property when committing a transaction (see also FSCUSERFORMS@1.1001:attrsetexpr: new window).
Example |
---|
// it is assumed that there is an object property "maindoc" cooobj.maindoc.objsubject = value; |
Read Display String
Defines an app.ducx expression that is called when a string representation of the value of the property is needed (see also FSCUSERFORMS@1.1001:attrgetdispexpr: new window).
Handle Copying of Field
Defines an app.ducx expression that is called when the property is copied (see also FSCUSERFORMS@1.1001:attrcopyexpr: new window). See also the execution order at the end of this chapter.
Handle Construction of Field
Defines an app.ducx expression that is called when the property is created (see also FSCUSERFORMS@1.1001:attrctorexpr: new window). If you just want to set the initial value of the property use Handle Initialization of Field. Handle Construction of Field can be used to run more general code.
Note: If you use the construction of the field to define an initial value, you may also want to define COOSYSTEM@1.1:NoOperation as copy action to keep the initial value for the copied object (see also the execution order at the end of this chapter).
Handle Destruction of Field
Defines an app.ducx expression that is called when the property is deleted (see also FSCUSERFORMS@1.1001:attrdtorexpr: new window).
Compute Control Styles
Defines an app.ducx expression that computes the control styles used to display the property (see also COOSYSTEM@1.1:attrcontrolstyleexpr: new window).
Example |
---|
// disables the create and search button for an object property |
Compute Control Options
Defines an app.ducx expression that computes the control options used to display the property (see also COOSYSTEM@1.1:attrcontroloptionsexpr: new window).
Example |
---|
// the control options are applied to a multiline text property of |
Execution Order
If you define the following expressions, the execution order will be as follows (e.g. when creating an object based on the form):
Note: The expressions can also influence the draft and release templates of the form, because also in this case construction, initialization and copy expressions are evaluated.