I have created one content type having fields like A,B,C,D,E,F,G. I have used computed filed module to compute these fields like the following. (Used filed group module to group some A&B in first group, C&D in second group , E,F,G are in third group. Here are the computations



E+F=G WHERE E,F AND G are computed fields .

The problem is when I submit the content type first time I am able to get E and F values but not G and if I edit the node and submit the result of G(E+F) is displaying correctly.

Here is the code snippet used to computed fields

$entity_field[0]['value'] = $entity->field_a['und'][0]['value'] * $entity->field_c['und'][0]['value'];

$entity_field[0]['value'] = $entity->field_b['und'][0]['value'] * $entity->field_d['und'][0]['value'];

$entity_field[0]['value'] = $entity->field_e['und'][0]['value']+ $entity->field_f['und'][0]['value'];

Display Output

$display_output= $entity_field_item['value'];

We tested the same scenario in Articles content type with field groups which shows all the results at a time i.e E,F and G.

I am getting errors on first submit.

Notice: Undefined property: stdClass::$field_e in eval()

Notice: Undefined property: stdClass::$field_f in eval()

What would be the problem?

1 Answer 1


I think this suggestion works

Go to the computed filed settings of G. Uncheck "Store value in the database" option might solves your problem. (If not necessary to store)

  • Hey.. it worked for me.
    – venkatesh
    Commented Mar 17, 2014 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.