Hi
Is it somehow possible to combine several columns in CCF in the "Columns list" -box like:
Model1.field1:Field one
Model1.field2: Field two
Model2.field1 * Model2.field2: Field three
Is it somehow possible to combine several columns in CCF in the "Columns list" -box like:
Model1.field1:Field one
Model1.field2: Field two
Model2.field1 * Model2.field2: Field three
Tried with a possible solution as stated on:
http://www.chronoengine.com/forums/posts/f12/t88356.html?page=1
No - go...😟 Any suggestions?
http://www.chronoengine.com/forums/posts/f12/t88356.html?page=1
No - go...😟 Any suggestions?
Well, I'm not sure how this topic went unnoticed for so long, sorry for that, looks like we need a new forum feature to solve this problem!
So, you can do this using the "PHP functions" box:
You will need to have a virtual field defined in the columns list first, e.g: Model.sum:Sum, the "sum" field here may or may not be a table field, its just virtual, so we can use it in the bottom data processing boxes.
Now in the "php functions" box:
Regards,
Max
So, you can do this using the "PHP functions" box:
You will need to have a virtual field defined in the columns list first, e.g: Model.sum:Sum, the "sum" field here may or may not be a table field, its just virtual, so we can use it in the bottom data processing boxes.
Now in the "php functions" box:
Model.sum:return Model2.field1 * Model2.field2;
Regards,
Max
Hi, thanks!
With:
Model1.Score:Score
And in the PHP-box: Model1.Score:return Model.field1 * Model.field2;
I got 'Model0field1' as a result. Doens't compute anything. Ideas?🙂
With:
Model1.Score:Score
And in the PHP-box: Model1.Score:return Model.field1 * Model.field2;
I got 'Model0field1' as a result. Doens't compute anything. Ideas?🙂
Well, it should actually be:
Regards,
Max
return $row["Model"]["field1"] * $row["Model"]["field2"];
Regards,
Max
This topic is locked and no more replies can be posted.