This topic is locked

Adding two fields

1/5/2009 6:56:07 AM
PHPRunner General questions
W
wilsonhaze author

Good day,

Please is there a php syntax to add integer values in a field, e.g like the sum of two fields to output in another field.

J
Jane 1/5/2009

Hi,
to calculate value use Before record added/Before record updated events on the Events tab.

Here is just a sample:

$values["FieldTotal"] = $values["Field1"]+$values["Field2"];



where Field1, Field2 and FieldTotal are your actual field names.