[TYPO3-english] Calculations in typoscript

Georg Schönweger georg.schoenweger at gmail.com
Sun Aug 12 18:34:58 CEST 2012


Hi,

you could try this;
1 = TEXT
1.insertData = 1
1.value = {field:group_a_1_3} * {GP:nameOfYourPostField}
1.prioriCalc = 1

// untested!

- Georg

Am 12.08.2012 17:06, schrieb Piotr Burda:
> W dniu 12.08.2012 o 14:15 Piotr Burda <pburda at typo3job.com> pisze:
> 
>> I have this TS
>> markers.master_input_wart = CONTENT
>> markers.master_input_wart {
>>      table = tx_pbjokapricelist_prices_full
>>      select {
>>      pidInList = 27
>>      orderBy = uid
>>      selectFields = uid, group_a_4_7
>>      # possible conditions
>>      where = ( tx_pbjokapricelist_prices_full.uid='1')
>>            }
>>        renderObj = COA
>>        renderObj {
>>            #value
>>            10.wrap =|
>>            10 = TEXT
>>            10.field = group_a_4_7
>>              }
>> }
>>
>> The code works well, but i have problem when i try to mutiply the
>> value "group_a_4_7", how to make mathematical operations on data form
>> database table?
>>
>> Regards Piotr
> 
> So, i have now working code
> markers.master_input_wart = CONTENT
>           markers.master_input_wart {
>             table = tx_pbjokapricelist_prices_full
>             select {
>               pidInList = 27
>               orderBy = uid
>               selectFields = uid, group_a_1_3
>               # possible conditions
>                where = ( tx_pbjokapricelist_prices_full.uid='1')
>             }
>             renderObj = COA
>             renderObj {
>               #value
>               1 = TEXT
>               1.insertData = 1
>               1.data = field:group_a_1_3
>               1.stdWrap.wrap = |*3
>               1.prioriCalc = 1
>             }
>           }
> 
> But i need to mutiply in line 1.stdWrap.wrap = |*3 , using a value
> submitted by form, ho to do it?


More information about the TYPO3-english mailing list