[TYPO3-dev] $TCA field with type=user in list

Mathias Schreiber [wmdb >] mathias.schreiber at wmdb.de
Fri Apr 17 11:23:26 CEST 2009


Rudy Gnodde schrieb:
> Hello,
> 
> I have a table in the database which basicly has the following fields:
> 
> uid
> pid
> ...
> num1
> num2
> num3
> num4
> 
> num1/4 are int values. What I want to do now is show the total of these 
> num fields per record in the TYPO3 backend. I used type=user in $TCA to 
> call a PHP script which returns the sum of the num fields. This works 
> fine for the form, but not for the list module. In the list module it 
> doesn't seem to do anything with the PHP script, but tries to select the 
> field (num_total) from the database, which doesn't exist.
> 
> Is there any way to do this?

You could calculate your values into a view and rewrite TCA to use this 
view.
This way you don't need any userFunc or anything.
Plus it will be faster :)

cheers
Mathias




More information about the TYPO3-dev mailing list