Drupal Association members fund grants that make connections all over the world.
Hi, I have 3 content types Item, Reservation and Client.
Content type Item has node reference (field_node) to Reservation, and the nodes from Reservation has a node reference count field (field_count_count) that is counting the references from Item nodes to very single Reservation node.
Content type Reservation has a node reference (field_client_ref) to the node from Client corresponding to the particular client. On the content type Client I have a computed field that is supposed to sum all the reference count field values that are concerning every single client. I also installed Corresponding node references and set a back reference from Client to Reservation nodes.
Then I put the following php code in my computed field:
$client_id = $entity->field_data_field_client_ref[LANGUAGE_NONE]['nid'];
$client_node_id = node_load($client_id, NULL, TRUE);
$entity_field['value'] = db_query("
WHERE entity_id = '$client_node_id';
But the system responses:
Notice: Undefined property: stdClass::$field_data_field_client_ref in eval() (line 1 of /home/teambill/public_html/drupal7/sites/all/modules/computed_field/computed_field.module(466) : eval()'d code).
Any suggestions or help, please!