Queries

Under Queries, you can configure your own database queries as SQL (Structured Query Language) expressions.

Queries 1:

The query can be created using the text editor

Queries 2:

Please note the SQL syntax of the respective database system:

PostgreSQL

After creating the query, the status can be checked in the Diagnostics tab:

Queries 3:

Parameters can be configured for the queries, which can be changed at runtime:

Queries 4:

The parameters can be configured in the query using the @Parameter_Name syntax:

Queries 5:

The parameter can be sent at runtime via the WriteValue:

{
    "commands": [
        {
            "commandOptions": [
                "SendErrorMessage",
                "SendWriteValue"
            ],
            "symbol": "TcHmiDatabase.local.list_machine_by_param",
            "writeValue": {
                "param_id": 42
            }
        }
    ]
}