This topic is locked

Calculated field from another tables

3/4/2009 12:15:09 PM
PHPRunner General questions
I
imendes author

How can I show in the list form and in the edit form, a value that should be calculated from values from 5 tables.
I want to show in the list form and in the edit form of a table (lets say the main table) a value that uses a field value from ther 5 tables (all related with the main table) to make the calc.
All that 5 tables includes a field named ACTUAL_STATE (int). I show it as radiobuttons (20%(20);40%(40);60%(60);80%(80);100%(100)). Now, I want to show in the main table the global state. I want to sum the field value on each table and in the end divide it by 5 ((n1+n1+n3+n4+n5)/5) and show than value in the list and edit form.
How can I do that?
Thank you.

J
Jane 3/5/2009

Isildo,
you can join your tables and calculate values on the Edit SQL query tab.
Unfortunately PHPRunner doesn't support updating multiple tables on one edit page.

To add calculate fields from another tables on the edit page use custom event (Insert PHP cide snippet option on the Visual Editor tab).