Hi team. I tested several ways and searched in the forum, but I am not able to find a working solution for v2025.
If using a hardcoded value for the WHERE clause, the SQL works ok, but I would like to dinamically assign this value obtained from a select.
The issue I am facing is that I am receiving “Undefined array key “x_resource_type”” error when trying to execute
function Row_Inserting(?array $oldRow, array &$newRow): ?bool
{
// Enter your code here
// To cancel, set return value to false
// To skip for grid insert/update, set return value to null
// Obtain the extension for resource
$extension = ExecuteScalar("SELECT resource_extension FROM tbl_resource_types WHERE _id = '" . AdjustSql($newRow['x_resource_type']) . "'::UUID");
// Generate the UUID filename for the uploaded file
GenerateFilename($newRow, "resource_path", $extension);
return true;
}
However, on debugging info in Environment & details: - POST Data section there is the parameter x_resource_type with its correct uuid value from the database
What am I doing wrong?
Thank you in advance