Validate element and call profile

The Behaviour type Validate element and call profile combines the behaviour types Validate element and Call profile as well as their configuration options (follow links for details).

The Behaviour type Validate element and call profile combines the behaviour types Validate element and Call profile as well as their configuration options (follow links for details).

images/download/attachments/177914233/image-2024-9-26_15-25-43-version-1-modificationdate-1727357142546-api-v2.png

The Behaviour type implicitly executes the two behaviours (Validate element and Call profile) in sequence according to the following logic:

  • Validate element is executed taking into account the linked element:

    • If no element is linked, the entire form is validated.

    • If an element is linked, it is validated including all elements that may be contained.

  • If the validation fails, the Actions on 'false' are executed without calling a profile and without providing data for the actions.

    • If a Validation result variable is indicated, the calculation function var (Read form variable) can be used to process 'validation hints' collected in the variable with the specified name.

  • If the validation is successful, the data of the validated element is transferred to the profile identified by the Profile name in the format selected as Encoder and in conjunction with any specified Variables.

    • If the addressed profile is inactive or does not return any data (e.g. because no response exists or applies), the Actions on 'false' are executed without providing any data for the actions.

    • If an error occurs while executing the profile, the Actions on 'false' are executed with an error object as data.

    • If the profile returns the text false as a fixed value, the Actions on 'false' are also executed (with this text value).

    • If the profile is executed without errors and returns data by a response, this data is processed by the selected Decoder and provided to the Actions on 'true'.

NOTEActions on 'false' can be executed either because of validation errors or because of profile errors, so it may be important to distinguish between these two causes in order to provide the user with qualified information. If the parameter Validation result variable is used, the specified variable can be checked for being 'empty' for this purpose – e.g. by a calculation expression (involving ifEmpty and var (Read form variable) – which is only the case if the validation was successful. Then, a 'profile error' must have occurred if the Actions on 'false' are executed.