field lock against user input with calculated field function

prettem

Member
Hello Eugenio,

I have a question regarding form fields in a data entry form. Is it possible to lock a text field (numeric) when creating a new record, but populate it with a calculated or default value?

When I use the default value function, the field is not locked against user input, but saving works fine. However, when I use the calculated field function, the field is locked but saving the record no longer works.

this error only occurs while an active calculated field function, not while a default value function:

2023/10/19 09:26:59 [error] 4057289#0: *52376 FastCGI sent in stderr: "PHP message: Fehler bei der Transaktion: There is already an active transactionPHP message: PHP Fatal error: Uncaught PDOException: There is already an active transaction in /var/www/vhosts/mpi-technik.at/ems.mpi-technik.at/include/custom_functions/calculated_fields_functions.php:40


Thank you for your assistance.
best Manuel

Your current DaDaBIK version​

You are using DaDaBIK version 11.10-Elba enterprise, installed on 02.09.2023 (installation code: 1907564f2723317ba7), the latest version of DaDaBIK is 11.11-Elba released on 27.09.2023

You are not running the last release of DaDaBIK, the release you are running might have bugs and security holes, see the official change log for further information. You can upgrade DaDaBIK here.

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 8.1.24

mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1

Web server: nginx/1.24.0

Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
 

eugenio

Administrator
Staff member
Hi,
I am not sure I have understood your question; let's start with the error you get when you use calculated fields: I guess the error is triggered by the code in your custom function. Maybe you started a transaction while a transaction is already open, as the error states?

Best,
 
Top