Generate Datasource functions

Datasource functions enable you to customize the behavior of a field and for example:

  • Check that the entered values exist in the Datasource.
  • List from the Datasource the possible values for the field.

You can generate the Datasource functions in the library of your choice. Function names are prefixed with the name of the Datasource.

To automatically generate functions in a Datasource:

  1. Click .
  2. Select the library where Datasource functions will be generated and click Generate.
  3. The type of the generated functions are:
    • Control
    • Get values
    • Modify

When generated, functions are created with a list of arguments that include system arguments as well as specific function instance arguments.

System arguments:

Function Argument Description
Control DATASOURCE

Datasource used in the function.

It contains the Datasource on which the function has been generated.

  TARGET_ COLUMN

Column in the Datasource that the control function uses to check if the value of the property is found among the values in the column.

  MESSAGE Message to display if the value of the property is NOT found among the values in the column.
Get values DATASOURCE

Datasource used in the function.

It contains the Datasource on which the function has been generated.

  TARGET_VALUE Column in the Datasource from which the values are taken. The selected value is saved into the database.
  TARGET_LABEL

Column in the Datasource that contains the values that will be displayed to the user.

This column is related to the TARGET_VALUE column. A value in the TARGET_LABEL column (displayed to the user) corresponds to a value in the TARGET_VALUE column (saved in the database).

Modify DATASOURCE

Datasource used in the function.

It contains the Datasource on which the function has been generated.

  EmptyProperties

True/ False property.

If true, target properties will be emptied if no result is found after the search (by default No)

  MultiResultStrategy

Strategy used when a filter returns several values.

Possible values are:

  • Off - Nothing happens.
  • First - The first value in the list is selected automatically.
  • Manual - A popup is displayed for the user to select the value.

You can pass filters as arguments when calling the function.

Allowed operators are:

  • Operators for Number and date: =, >, <,>=, <=, in, not in
  • Operators for String: like, not like =, !=, in, not in

When no operator is set, '=' is used

Example: "> {AMOUNT}"

Related Links