How do I populate a CCK field that is the difference of 2 CCK field values?
I am able to invoke the $current_points variable but not the $duration_points variable I created..
field_scheduling_hours exists in the user's content profile
filed_calc_duration exists on the node being created. It is a CCK computed field type.
I am executing the following PHP snippet:
// Current user points.
$current_points = $node->field_scheduling_hours['value'];
$duration_points = $node->field_calc_duration['value'];
$new_total = $current_points - $duration_points;
// Remove duration hours from available hours.
// Rules will make sure the content profile is saved
// after all rules have finished executing.
0 => array('value' => ($new_total)),