Skip to main content
Version: Next

Field Management

Introduction

Fields are the basic elements of a form. They allow storing and displaying data. Adding fields is done via the Form Designer, using the top ribbon.

Adding a field

  1. Open your form in the Designer.
  2. In the ribbon, click on the Fields tab.
  3. Select the desired field type and drag it (Drag & Drop) into the work area (into a table or section).

Designer Fields Tab

Field types

Input fields

These fields allow the user to enter data manually.

  • Text Field: Free text input on one line.
  • Date Field: Date input (with calendar).
  • Number Field: Numeric input (integer or decimal).
  • Rich Text: Multi-line text area with formatting (bold, italic, etc.).
  • Comment: History area (adding timestamped notes, non-editable afterwards).

Choice fields

These fields force the user to choose from predefined values via a Value List.

  • Dropdown list: Single selection from a list.
  • Radio button: Single selection with display of all options.
  • Checkbox: Multiple selection possible.
  • Picklist Field: Advanced multiple selection (useful for very long lists).

Informational and System fields

  • Label: Static text to display instructions or titles.
  • System Fields: Data managed by the engine (e.g.: Creation Date, Modified by, Reference, Version).

Advanced Fields (Experts)

  • Calculated (C#): The value is determined by a C# formula.
  • Custom (JS): Specific client behavior (e.g.: person selector).
  • Choice from a view: Allows retrieving data from another form.

[!TIP] For more details on calculated and custom fields, see the Rules and Scripts section.

Field properties

Once a field is added, select it to configure its properties in the right panel.

Field Properties

Common Properties

  • Label: The text displayed next to the field (e.g.: "Amount excl. tax").
  • Name: The technical identifier of the field (e.g.: txt_montant_ht).
    • Important: Use an explicit name, without spaces or accents.
  • Required: If checked, the user cannot save without filling this field.
  • Technical field: If enabled, this field will not be visible in the "Criteria" tab when configuring Views (it remains usable in scripts and stored in database).

Specific Properties

  • Value list (for choice fields): Allows linking the field to an existing list.
  • Multi-valued: Allows selection of multiple elements.
  • Contains a resource: Indicates that the field value corresponds to a user login (useful for Actors).

Advanced Mode

By checking the "Advanced properties" box at the bottom of the panel, you access all technical configuration keys (stored in ApsOptions). Here is the comprehensive list of available properties (based on the source code FormularField.cs):

Data Properties

  • DefaultValue: Default value inserted when creating the form.
    • Example: In progress or @User.DisplayName
  • SQLSize: Forces the column size in the database.
    • Example: 4000 or MAX (useful for long comment fields).
  • Computed: C# formula to calculate the field value server-side.
    • Example: return this.TotalHT * 1.20;
  • Mandatory: Makes input required.
    • Example: true

Display and Input Properties

  • UpperCase: Forces text conversion to uppercase during input.
    • Example: true
  • Multiple: Allows multiple selection (for lists).
    • Example: true
  • RichText: Enables the rich text editor (HTML).
    • Example: true

List Properties (Choices)

  • Helper: Defines the link to a global Value List.
    • Example: Field_OpenKeywords('ListePays')
  • Keywords: Defines a local or dynamic list.
    • Static list:
      Value1
      Value2|Label 2
    • SQL query:
      SQL=SELECT Nom, ID FROM T_CLIENTS WHERE Actif = 1
    • Macros: @Societes

Integration Properties

  • IsDirectoryResource: Links the value to a directory login (User/Role).
    • Example: true (The field will store "domain\jdoe" but display "John Doe").
  • javascript: Client script executed on events.
    • Example (on OnChange):
      getField("txt_autre_precision").show();
  • javascript:oninit: Client script executed when loading the field.
    • Example:
      this.setColor("red");