Categories > TinyButStrong general >

Php user function

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Alex
Date: 2016-05-26
Time: 15:52

Php user function

Hi,
I have a word template with these tags (each one on a table column)

[testUserFunction.nome;block=tbs:row;ondata=test]    [testUserFunction.cognome]

to display records from a correctly formatted array.
I need to get the (testUserFunction.nome in a php function to test it) but function test is never called when MergeBlock.

This is the function in the same php page that generates the opentbs output.

function test($BlockName,&$CurrRec,$RecNum) {
    $CurrRec = "test";
}


Where should I check?
Alex
By: Skrol29
Date: 2016-05-28
Time: 23:41

Re: Php user function

Hi,

First check that you have data with the block. function test() is supposed to be called once for each record.
What is the result of your merge ?

Thake care in your test() function that &$CurrRec is an associative array.
By: Alex
Date: 2016-06-03
Time: 10:00

Re: Php user function

Hi Skrol29,

There was indeed a stupid typo... (function  without () ); now I works!
Thank you