Custom Functions are not working


#1

Hi,
I have managed to get Kreporter 4.2 working (mostly) with SuiteCRM but have noticed that the “custom functions” have no effect on the output - meaning it’s just outputting the field value. I have tried several different functions, including simple concatenation (i.e. concat({f}.{t}," hello"), and it still only returns the field value.

Can anyone help me understand how I can find out where the problem might be?

I’ve looked in the error_log and the line below appears to be the only new and unusual message at around the time of my save:

Got error ‘PHP message: PHP Notice: Undefined variable: opParams in /opt/bitnami/apps/suitecrm/htdocs/include/nusoap/nusoap.php on line 5484\n’

Thanks in advance.


#2

Not sure if this a typo or if you copied/pasted your example code but you put field before table name.

{t} stands for the table where to find the field you dragged.
{f} stands for the field you dragged.
Use {tc} for table if your module was created over studio (table name will end with _cstm)

You will find some examples in documentation
https://spicecrm.gitbooks.io/kreporter-4-x/content/advanced/custom-sql.html

Please post SuiteCRM version number you have in use and add some screenshots if you stil encounter problems.


#3

It was a typo, but I’ve noticed it was a silly mistake actually in that I’d added the formula to the “Formula” column instead of “CustomFunction”. Works fine now.

Thanks for the quick reply and the link which is just what I needed.