I'm using CF to tabulate data in created content. The user specifies hours for each section, CF successfully multiplies by pay for each section, and then a grand total CF field adds all the sections' CF total pay field:

$node_field[0]['value'] =
$node->field_computetotal[0]['value'] +
$node->field_edfcompute1[0]['value'] +
$node->field_edfcompute2[0]['value'] +
$node->field_edfcompute3[0]['value'] +
$node->field_edfcompute4[0]['value'] +
$node->field_edfcompute5[0]['value'] +
$node->field_edfcompute6[0]['value'] +
$node->field_edfcompute7[0]['value'];

However, this doesn't seem to work after the initial creation of the document. After editing the document and resaving it, the grand total field finally works.

Is there a workaround or something?

Comments

Moonshine’s picture

Category: bug » support

Not sure I completely understand this but it sounds like you have a computed field that gathers a grand total from other computed fields? My guess is that your grand total computed field is being triggered for calculation before your other fields are calculated. You might want to try reordering that one to the end of the list.

mmjvb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)