Setting a field to null in an own extension won work with process_datamap()
Setting eval=null in tca.php of the extension now works in the Typo3 forms, but how can I change or set a value to NULL in my own extension.
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
where I got a "field" => null in the $data array wont work (sets the field to 0).
Currently I am manually deleting the value with an UPDATE statement, but thats not how its meant to be I guess. Looks like old code from the area before NULL was possible in number fields.
#2 Updated by Klaus Hinum about 4 years ago
I am trying to e.g. write NULL in a database field. The problem is, if I set a variable to NULL and write it to the database using process_datamap(); it is set to 0 altough NULL is allowed and possible in the typo3 backend. I guess there is a separate function to write NULL to the field, but I dont know why NULL and 0 are not differentiated by tce->... functions.
This should cover a) and c), how I try it is the code piece above with $data e.g. set to $data['field'] = null;