Modify field in node drupal 7 I have field "myfield" in a node. The field is created in the content, not by hook. I want to change the value of that field. I do not want to display the value from database, but my value let's say random number. I tried to do this with hook_node_view and with hook_entity_view but I cannot change it on the display. Here is my code:

function mymodule_node_view($node, $view_mode) {
  if ($node-&gt;type == 'my_node_type') {
    if ($node-&gt;nid == 46) {
      $node-&gt;myfield['und'][0]['value'] = 55;
//or I tried with $node-&gt;content and no success
    }
  }
}


What am I missing? Can you help me, please!
Thanks you in advance!
You can use this line instead:

$node-&gt;content['myfield'][0]['#markup'] = '55';