sum field from two databases

Hi,

I use this parameter from Row_Rendered with database “ordini”
$this->Importo->EditValue = intval($this->Prz->EditValue) * intval($this->Qnti->EditValue);
I have an “order fulfillment” database where I created “Custom field” that reads the data from “orders”, everything works when I enter the data.

I have 2 problems:

  1. from “edit” or “list” the “amount” field is not calculated (in “add” it calculates it correctly).

  2. from 2 “edit” the custom filed fields are empty.

The “custom fiel” fields are updated through a “job” field with “lookup” and “auto fill”

  1. In List page there is no EditValue, you may use CurrentValue.
  2. In Add page your code will not work because there is no EditValue yet.
  3. In Edit page your code should work.
  4. If you set up the Custom field correctly, e.g. “Prz * Qnti”, then the value should be calculated by the database, you do not need to add code yourself, see the example in the topic “Custom Fields” in the help file.
  5. If the custom field is supposed to be auto-calculated, why using autofill?

I have verified what is happening in “add”;
I entered this formula in “client side events” the database ‘ordini’ fields “Iva” / “Quantita” / “Prezzo”
in the field “Importo_Ord” I inserted ‘Prezzo’ * ‘Quantita’

{ // keys = event types, values = handler functions
“change keyup”: function(e) {
var $row = $(this).fields();
var st = $row[“Prezzo”].toNumber()*$row[“Quantita”].toNumber();
$row[“Importo_Riga_Ord”].value(st);
}
}
everything worked correctly.

in the “evasioneordini” database “client side events” I entered the formula in the fields “Var_Iva” / “Var_Quantita” / “Var_Prezzo”
in the field “Var_Importo_Ord” I inserted ‘Prezzo’ * ‘Quantita’

{ // keys = event types, values = handler functions
“change keyup”: function(e) {
var $row = $(this).fields();
var st = $row[“Var_Prezzo”].toNumber()*$row[“Var_Quantita”].toNumber();
$row[“VAr_Importo_Riga_Ord”].value(st);
}
}

after this operation fiel “Var_Importo_Ord” and “Importo_Ord” both the “ordini” and “order fulfillment” databases do not execute the sum on filed.
if I delete the formula from the “order fulfillment” fields, the “orders” database starts working correctly.

tnk.