Post Processing (onSubmit)

The form data, which the user submitted, can be processed in different ways. Depending on your use case, you can decide between the following destinations:

Destinations

Description

Destinations

Description

BLP 5.1

Flexible and powerful low-code middleware engine for processing data and files. Needs to be licensed separately.

ELO

Simple way to store files and metadata directly in ELO.

Python

Execute a python script to realize any possible requirement.

SQL

Use the form fields inside a SQL query.
Not limited to SQL SELECT statements.

General

Some settings are shared between multiple or all Post Processing Destinations

Field Processors

Destinations

ELO

SQL

Python

BLP 5.1

Supported

ELO

The evaluated Field processors are written as Mask Fields to the created/updates Folder. Details see ELO | Mask Attributes

Python

The evaluated Field processors are passed alongside the form fields to the python script via the --args flag.

SQL

The evaluated Field processors are available as variables for the SQL query.

Mode Update

SubmitType

ELO

SQL

Python

BLP 5.1

Supported

With the Mode Update you can get the ‘previous’ attributes from an entry available as variables to be used for Field Processors, SQL Query or further processing in your Python script.

The attributes are prefixed with ORIGIN_ (STATUS → ORIGIN_STATUS)

In addition a check is applied:

  • SQL and Python

    • If no entry is found when a form is submitted the operation is cancelled

  • ELO:

    • If no entry is found when a form is submitted AND the scope is set the STRICT the operation is cancelled

Python/SQL

Two configs are required:

  • mode: UPDATE

  • source: sectionID

  • forward ‘key’ in the section action config. Column Types | Form

- id: edit_entry onSubmit: mode: UPDATE source: sectionID
Python:

Variables are automatically available in your configured python script. Details and full Example see Python | Configuration

SQL:

Variables are automatically available to be used for the SQL query configuration. Details and full Example see https://portrait.atlassian.net/wiki/x/pQNXPQ

ELO:

Three configs are required:

- id: edit_entry onSubmit: mode: UPDATE source: sectionID scope: STRICT

please also follow the additional details here: ELO | MODE: Update

Please note that the previous variables are only loaded when working with STRICT MODE in ELO! Details see ELO | Improved Security: Scope (Strict / Loose)

Conditions

SubmitType

ELO

SQL

Python

BLP 5.1

Supported

For more details see Conditions

Summary:

The concept of conditions, allows for extensive input validation to keep your data consistent at all times.

- expression: "{{or (in SELECTED_STATUS 'STATUS1' 'STATUS2') (eq PORTRAIT_USER_ROLE 'ADMIN')}}" errorMessage: 'only STATUS1 or STATUS2 are allowed, Admin can do anything'

If needed, variables can also be preprocessed with fieldProcessors, this allows for a better readability.