Hi Bob, Hi Foks
I have 4 collums in my table which I will calculate
the value form colum 1 and colum 3
plus the value from colum 2 and 4
I'm a newbie wirth CFv5... so i don't get an idea IF this possible and if yes how this works.
I user CFv4 in Table format and not with custom code... thats a stap to far me i think 😀
I hope there someone who can help me with this
I have 4 collums in my table which I will calculate
the value form colum 1 and colum 3
plus the value from colum 2 and 4
I'm a newbie wirth CFv5... so i don't get an idea IF this possible and if yes how this works.
I user CFv4 in Table format and not with custom code... thats a stap to far me i think 😀
I hope there someone who can help me with this
Hi dhuizinga1,
You can use the Front List > Settings > PHP Functions box to create new column values as functions of the other columns.
Bob
You can use the Front List > Settings > PHP Functions box to create new column values as functions of the other columns.
WG1617.total_a:return $row['set-1-a'] + $row['set2-a'];
Bob
Hi Bob,
Thnx for the quick answer.. I think the solution is near but not yet correcty...
As you can see I add you solution. (Pic 1)
I add by Columns list the coloms A & B (Pic 2)
With this construction I don't get an error on my screen but the result is zero in both columns..
what do i wrong?
Thnx for the quick answer.. I think the solution is near but not yet correcty...
As you can see I add you solution. (Pic 1)
I add by Columns list the coloms A & B (Pic 2)
With this construction I don't get an error on my screen but the result is zero in both columns..
what do i wrong?
Hi dhuizinga1,
By all means email or PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look. I think that some temporary debugging code may be needed to see exactly what is happening.
Bob
By all means email or PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look. I think that some temporary debugging code may be needed to see exactly what is happening.
Bob
done...
send you a pm with login
send you a pm with login
Hi dhuizinga1,
Fixed I think, I had forgotten to include the model ID in the code:
Bob
Fixed I think, I had forgotten to include the model ID in the code:
WG1617.total_a:return $row['WG1617']["set1-a"] + $row['WG1617']["set2-a"];
WG1617.total_b:return $row['WG1617']["set1-b"] + $row['WG1617']["set2-b"];
Bob
That´s it.... thanx bob
Hi Bob
I need this kind of calculation in CCv6. I tried a php-function with this code .... but it doesn´t run.
Thx
Arnold
I need this kind of calculation in CCv6. I tried a php-function with this code .... but it doesn´t run.
Thx
Arnold
Hi Arnold,
You need to call the php function inside the table "columns views", e.g: {function:function_name}, and in the php function content you can use this code:
Best regards,
Max
You need to call the php function inside the table "columns views", e.g: {function:function_name}, and in the php function content you can use this code:
echo $this->get("table_view_name.row.Model.field1") + $this->get("table_view_name.row.Model.field2");
Best regards,
Max
Hi Max
I tried to implement your suggestion ...... but no sum are shown in the listing. What´s wrong?
Thx a lot for your help
I tried to implement your suggestion ...... but no sum are shown in the listing. What´s wrong?
Thx a lot for your help
Hi Arnold,
I have updated my previous post with a form call example and code fix ("row" added), please update your setting and test again.
Best regards,
Max
I have updated my previous post with a form call example and code fix ("row" added), please update your setting and test again.
Best regards,
Max
This topic is locked and no more replies can be posted.