Add dynamic SQLStatements to custom queries

It would be of great help, if it were possible to add SQLStatements in custom queries dynamicly. Like values from a set var or a repeat out of another database query.

Is there anything that would be against such an implementation?

Can you post some example of what you’re trying to achieve?

I'd like to add a server action that generates statistic data reports out of a raw data table. We have the SQL-Statements for each of the reports in a database table. Without the dynamic support we have to add multiple server action steps per report, as adding the SQLStatements need to be added manually, which is time consuming and bad for maintenance. With the currenty restriction we need to add more than 80 blocks of code, one for each of the reports.

1 Like

Looks like it's working when adding dynamic data {{query.field}} manually.