Text

Article • 02.08.2022 • 14 minute(s) to read

Text

The Text or Text field allows Users to interact with short texts, i.e., the Data Type Short String. It also offers the possibility to trigger an Action when the User presses the enter key.

The Text can be used to process inputs from a barcode scanner. Since most barcode scanners deliver the code they scanned as text, you can use the functionality of the Text to make the barcode scanning as comfortable for the Users as possible:
Automatically set the focus on the Text corresponding to the barcode on entering the From. This allows users to immediately scan the barcode and they are not required to manually select the Text before scanning. Configure an Action triggered by the barcode scanner’s pseudo enter key transmitted at the end of the barcode. This reliefs the Users from manually triggering an Action by pressing a Button once the scanning is complete.

Texts have related Form Controls that are better suited in some cases:
Use Passwords for inputting passwords Use Numbers for integer and decimal inputs Use Text Areas for longer text Use Dropdowns for predefined texts Use Text Editors if the entered text should also be formatted by the Users

Control properties

  • Id / Name - Identifier of the Form Control. Id / Name needs to be unique for all Form Controls on the same Form. Id / Name also binds the Form Control to an Attribute with the same name of the Variable backing the From. This means that the Form Control will load and show the value from said Attribute when the Form is entered, and that the value of the Form Control is stored in the Attribute when the Form is left by a Save or Sign and Save action. The Form Control can also be bound to an Attribute of a Variable other than the one backing the From by using the fully qualified name as Id / Name:

    A detailed explanation of the different linking mechanisms between a Form Control and an Attribute is given in the Variable and Variable Type configuration of the From Activity.

  • Label text - Caption rendered above the Form Control thus identifying it to the Users.

  • Placeholder - Text show in the Form Control when the Form Control is empty.

  • Help text - Explanation of the Form Control shown below the Form Control.

  • Default value - Default value loaded when the Form is entered and no value is available from the linked Attribute.

  • Has focus? - Automatically sets the cursor in this Form Control when the Form is opened (Yes) or does not (No). Keep in mind that only one Form Control per Form can have the Focus.

  • Copy from other control - Here, the Id / Name of another Form Control can be entered in Form Control Expression Syntax, e.g., $[FromControlName]. Then, whenever the value of the other Form Control is changed, the new value will be taken over in this Form Control. The changes will not be taken over immediately, but rather when the user’s input is finished and the other Form Control lost its focus. If this field is empty, the copy mechanism is inactive.

  • Enable conditional mandatory validation? - This property is similar to the Is field mandatory? property, but allows you to specify a condition determining when the Form Control becomes mandatory. If Enable conditional mandatory validation? is set to No this property is disabled. If set to Yes, a condition can be entered determining when the Form Control becomes mandatory. When the condition evaluates to true, the Form Control cannot be left empty or unspecified in case a Save or Sign and Save Action is triggered. Dismiss and Sign Actions do not enforce the mandatory condition. However, it does not matter if the value was entered by the User or did already existed in the Attributes backing this Form Control, but it just has to exists. When List of values? is set to Yes, this property is ignored.

    • Condition for is mandatory - When this Form Control Expression evaluates to true, the Form Control becomes mandatory. An asterisk in front of its label indicates if the Form Control is currently mandatory.
  • Is field mandatory? - When set to No, the Form Control can be left empty or unspecified. When set to Yes, the Form Control cannot be left empty or unspecified. The Actions Save or Sign and Save enforce this condition, while Dismiss and Sign Actions do not enforce it. If set to Yes, it does not matter if the record is entered by the User or did already existed in the Attribute backing this Form Control. Mandatory Form Controls are indicated by an asterisk in front of their label. This property is only available if Enable conditional mandatory validation? is set to to No. When List of values? is set to Yes, Is field mandatory? is ignored and the Require at least one record? property of the LIST CONFIGURATION has to be used instead.

  • Disable control? - Makes the Form Control editable (No) or read-only (Yes). Be aware that the content of read-only Form Controls is not stored by Save and Sign and Save Actions in the linked Attribute.

  • Hide control? - Hides (Yes) or shows (No) the Form Control in the Form. Be aware that the content of hidden Form Controls is stored by Save and Sign and Save Actions in the linked Attribute.

  • Condition type - Allows you to hide or disable the Form Control based on a Form Control Expression evaluating to true or false:

    • Display - Hides the Form Control when the Form Control Expression evaluates to false and shows it when the Form Control Expression evaluates to true. Be aware that the content of hidden Form Controls is stored by Save and Sign and Save Actions in the linked Attribute.
    • Disable - Makes the Form Control editable when the Form Control Expression evaluates to false and makes it read-only when the Form Control Expression evaluates to true. Be aware that the content of read-only Form Controls is not stored by Save and Sign and Save Actions in the linked Attribute.
    • Display condition or Disable condition - The Form Control Expression behind the condition
ACTION CONFIGURATION

Properties to add an Action to this Form Control:

  • Perform action on enter key pressed? - When set to No, this Form Control will not trigger any Action. If set to Yes, this Form control will trigger an Action when the enter key is pressed while the Form Control has the focus.
    • Outcome - When the Action is triggered the Outcome selected here is used to leave the Form Activity. If multiple Outcomes with the same name exist, all of them are used and the execution of the Instance continuous in parallel.
    • Action - Specifies the triggered Action type:
      • Discard - Discards all modifications of the Form Controls.
      • Save - Stores the data from the Form Controls in the Variable backing the Form Activity. The Variable is set in the Variable configuration of the Form Activity.
      • Sign - Stores only the signature in the specified Attribute.
      • Sign and Save - This is a combination of Sign and Save. It stores the signature in the specified Attribute and stores data from the Form Controls in the Variable backing the Form Activity.
    • Style - Only available, if the Action is linked to a Button. Then, this property sets the color of the Button representing the Action.
    • User attribute - Specifies in which Attribute the Id of the User triggering the Action will be stored. The Attribute has to be selected from the Variable backing the From. The Attribute needs to be of type Big Integer if only one User can complete the From or has to be an array of Big Integer, if the property Must all owners complete the task? is set for this Action and all owners are required to complete the Form.
    • Return to dashboard? - When set to Yes, the User will be send back to the main Dashboard by this Action regardless if there are any further Forms to show or not. When set to No, the User will be presented with the next Form. When there are no further Forms left in the Instance, the User will be send back to the main Dashboard in any case.
    • Skip form validations? - When set to Yes, any validation rules configured at the Form Controls are ignored. This might be desirable for Discard Actions. When set to No, all validation rules configured at the Form Controls are enforced.
    • Claims ownership of task? - When set to Yes, only the User triggering the Action will remain the owner of the From and all other Users or User Groups will be relieved of their owner status. When set to No, the owner configuration is unmodified.
    • Must all owners complete the task? - Specifies if one owner can trigger the leaving of the Form by this Action (No) or if all owners have to individually trigger this Action (Yes) to leave the Form and continue the Instance. When set to Yes, the following logic applies:
      • All Users set individually by their Id as owners have to trigger the Action separately
      • One User per configured User Group has to trigger the Action
      • The triggering of the Action by Users who are in more than one User Group is counted for all User Groups simultaneously. I.e., it is not necessary for Users to trigger the Action multiple times if they are part of more than one User Groups configured as owners.
      • When Must all owners complete the task? is set to Yes, special care must be giving in the configuration of the other Actions:
        • Only one Action of a From is allowed to be set to Yes. Otherwise, deadlocks are created when individual Users choose different Actions.
        • Usually only read-only Forms require the completion by multiple owners. If the Form is not read-only, one User can complete it, then another use can modify it without the first User noticing it. However, comment fields are often an exception to this read-only rule.
        • The Attributes configured at Signature attribute and User attribute have to be arrays.
    • Reset approval of all owners - Triggering this Action resets other Actions (Yes) or leaves other Actions unchanged (No) when the Form Activity is entered again in the same Instance. This property is particular important, when Must all owners complete the task? is used:
      • In the case that some, but not all of the Owners, trigger an Action which has Must all owners complete the task? set to Yes and the remaining Owners trigger another Actions, the Instance leaves the Form Activity and continues the execution of the Instance.
      • If this continuation leads the Instance back to the same Form Activity, the Novunex Platform still remembers that some Owners already triggered the Action which has Must all owners complete the task? set to Yes.
      • If this is not desired, Reset approval of all owners needs to be set to Yes, so that the Novunex Platform resets all previously triggered Actions, when a From Activity is re-entered in the same Instance.
    • Show comment field - Shows (Yes) or hides (No) a comment field. When the filed is shown, the Users can write a free-text comment in it.
    • Signature attribute - This property is only available for Sign and Sign and Save Actions and sets in which Attribute of the Variable backing the Form the Signature is stored. The Attribute needs to be of type Signature if only one User can complete the From. It has to be an array of Signature, if the property Must all owners complete the task? is set to Yes and all Owners are required to complete the Form.
LIST CONFIGURATION

Required configuration if this Form Control is representing an array of values:

  • List of values? - Form Control represents an array (Yes) or a single value (No). Form Controls of arrays have two additional properties:
    • Require at least one record? - Specifies if the array can be empty (No) or must have at least one record (Yes). This property is equal to the Is field mandatory? property of non-array values. The Actions Save or Sign and Save enforce this condition, while Dismiss and Sign Actions do not enforce it. If set to Yes, it does not matter if the record is entered by the User in the current session or did already exist in the array backing this Form Control. An asterisk next to the title indicates to the Users, that this property is set to Yes and at least one record is required.
    • Disable delete? - When set to No, all entries in the array backing the Form Control can be deleted. If set to Yes, only new entries entered by the User in the current session can be deleted but entries already in the array cannot not be deleted.
VALIDATIONS

Validations are rules to check the Users' inputs for singe and array Form Controls alike. You can add multiple validations to a Form Control and they are checked in an arbitrary order. The validations are checked if the a Save or Sign and Save Action is triggered. Clicking Add Validation creates a new validation, clicking removes a Validation. In case the Form Control represents an array, all entries of the array must fulfill all validations. The following Validation types are available and can be configured with the described properties by clicking on :

  • Length - Entered string must be of a specific length
    • Error message - This message is shown to the Users in case the validation fails.
    • Minimum length - The entered string must be at least as long as this or longer. If no minimum length is specified, the minimum length is not not enforced.
    • Maximum length - The entered string must be shorter or equally long as this. If no maximum length is specified, the maximum length is not not enforced.
  • Min/Max Value - Entered value must be within a certain range
    • Error message - This message is shown to the Users in case the validation fails.
    • Minimum value - The entered number must be equal or grater to this value. If no minimum value is specified, the minimum value is not not enforced.
    • Maximum value - The entered number must be equal or smaller to this value. If no maximum value is specified, the maximum value is not not enforced.
  • Number - Checks if the entered value is an integer.
    • Error message - This message is shown to the Users in case the validation fails.
  • Date - Checks if the entered string is a valid date in the format 'yyyy-MM-dd'.
    • Error message - This message is shown to the Users in case the validation fails.
  • Equal to other field - Tests if the entered value is equal to the value of another Form Control.
    • Error message - This message is shown to the Users in case the validation fails.
    • Other field name / id - Id / Name referencing the other Form Control the content of this Form Control should be equal to.
  • Not equal to other field - Tests if the entered value is not equal to the value of another Form Control.
    • Error message - This message is shown to the Users in case the validation fails.
    • Other field name / id - Id / Name referencing the other Form Control the content of this Form Control should not be equal to.
  • Greater than - Tests if the entered value is grater than the value of another Form Control.
    • Error message - This message is shown to the Users in case the validation fails.
    • Other field name / id - Id / Name referencing the other Form Control holding a lower bound for this Form Controls content.
  • Less than - Tests if the entered value is smaller than the value of another Form Control.
    • Error message - This message is shown to the Users in case the validation fails.
    • Other field name / id - Id / Name referencing the other Form Control holding an upper bound for this Form Controls content.
  • Email - Checks if the entered string follows the convention of email addresses.
    • Error message - This message is shown to the Users in case the validation fails.
  • Url - Checks if the entered string follows the convention of URLs.
    • Error message - This message is shown to the Users in case the validation fails.
  • Regex - Tests if the entered value matches a Regular Expression (RegEx).
    • Error message - This message is shown to the Users in case the validation fails.
    • Regex pattern - The Regular Expression the value of this Form Control needs to match. The Regular Expression has to follow the JavaScipt Regular Expression dialect.
  • Sql - Tests the entered value with a custom SQL SELECT query.
    • Error message - This message is shown to the Users in case the validation fails.
    • Sql - The SQL SELECT query to test the entered value. The query must return only one field, which is 0 if the validation fails and 1 if the validation is successful. The value from the Form Control is accessed in the query by @value.