[TYPO3-english] calculation with values from register

Peter Klein peter at clioonline.dk
Tue May 11 15:02:49 CEST 2010


Hi Rob.

You need to put the "Math part" in a "cObject", so that the "prioCalc"
sees numeric values and not "register:blahblah"..

Just change the 40 part of your script to this, and it should work.

-- cut --
	40 = TEXT
	40.cObject = TEXT
	40.cObject.dataWrap = {register:20}+{register:21}
	40.prioriCalc = 1
	40.wrap = <br />SUM=|
-- cut --

--
Peter Klein / Clio Online

On Tue, 11 May 2010 11:41:52 +0000 (UTC), Rob De Vries <dev at rob-ot.be>
wrote:

>Hello,
>
>I'm trying to do a very simple calculation with values i've added to the 
>register :
>
>lib.output = COA
>lib.output {
>	20 = LOAD_REGISTER
>	20 { 
>	20.numRows.table = tt_content 
>	20.numRows.select.pidInList = this
>	20.numRows.select.where = tx_templavoila_ds = 2 AND deleted=0 AND 
>hidden=0
>	
>	}
>	
>	21 = LOAD_REGISTER
>	21 {
>	21.numRows.table = tt_content 
>	21.numRows.select.pidInList = this
>	21.numRows.select.where = tx_templavoila_ds = 5 AND deleted=0 AND 
>hidden=0
>	}
>	
>	22 = LOAD_REGISTER
>	22 {
>	22.numRows.table = tt_content 
>	22.numRows.select.pidInList = this
>	22.numRows.select.where = tx_templavoila_ds = 6 AND deleted = 0 AND 
>hidden=0
>	}
>	
>	40 = TEXT
>	40.value = {register:20}+{register:21}
>	40.insertData=1
>	40.prioriCalc = 1
>	40.wrap = <br />SUM=|
>}
>
>output:  SUM=0
>
>I don't understand why the outpuy is 0
>
>register:20 = 1 and register:21 = 3 so the output need to be 4. 
>
>any suggestions on what i'm doing wrong ?
>
>tnx
>Rob


More information about the TYPO3-english mailing list