title: TYPO3 TCA make the 'default' value dynamic
body: <p>The title is rather self explanatory, but what i would like to have is a dynamic default value.</p>
  
  <p>The idea behind it is to get the biggest number from a column in the database and then add one to the result. This result should be saved as the default value. </p>
  
  <p>Lets take for example this code:</p>
  
  <pre><code>$GLOBALS['TCA'][$modelName]['columns']['autojobnumber'] = array(
      'exclude' =&gt; true,
      'label' =&gt; 'LLL:EXT:path/To/The/LLL:tx_extension_domain_model_job_autojobnumber',
      'config' =&gt; [
          'type' =&gt; 'input',
          'size' =&gt; 10,
          'eval' =&gt; 'trim,int',
          'readOnly' =&gt;1,
          'default' =&gt; $result,
      ]
  );
  </code></pre>
  
  <p>The SQL looks like this:</p>
  
  <pre><code>$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-&gt;getQueryBuilderForTable('tx_extension_domain_model_job');
  $getBiggestNumber = $queryBuilder
       -&gt;select('autojobnumber')
       -&gt;from('tx_extension_domain_model_job')
       -&gt;groupBy('autojobnumber')
       -&gt;orderBy('autojobnumber', 'DESC')
       -&gt;setMaxResults(1)
       -&gt;execute()
       -&gt;fetchColumn(0);
  $result = $getBiggestNumber + 1;
  </code></pre>
  
  <p>So how can i do that "clean"?</p>
  
  <p>I thought about <code>processCmdmap_preProcess</code> but i dont know how to pass the value to the coorisponding TCA field. Plus i do not get any results on my backend when i use the <code>DebuggerUtility</code> like i get them when i use <code>processDatamap_afterAllOperations</code> after saving the Object.</p>
  
  <p>Can someone point me to the right direction?</p>