Need to identify higher value and lower value stored in the multivalue field I have a Multivalued field called temperature in that everyday temperature values are stored. In that i would like to identify the highest and lowest value from that field.I found computed field module will do that but i would like to know how i achieve same in computed field.please anyone guide me do this.

Thanks
Never put code in the database. It is impossible to maintain and debug, and you spend hours wasting your time.

The computed field gives you the option to add the code to a custom module.

My answer used these three fields added to the content type:


Temp (machine name field_temp, integer, multi-value)
Highest (machine name field_highest, computed, int)
Lowest (machine name field_lowest, computed, int)


Method:
Create a custom module (just module and info files), then add this to the module file:

function computed_field_field_highest_compute(&amp;$entity_field, $entity_type, $entity, $field, $instance, $langcode, $items) {
  $temps = field_get_items($entity_type, $entity, 'field_temp');
  if (count($temps)) {
    $max = $temps[0]['value'];
    foreach($temps as $temp) {
      $max = $temp['value'] &gt; $max ? $temp['value'] : $max;
    }
    $entity_field[0]['value'] = $max;
  }
}

function computed_field_field_lowest_compute(&amp;$entity_field, $entity_type, $entity, $field, $instance, $langcode, $items) {
  $temps = field_get_items($entity_type, $entity, 'field_temp');
  if (count($temps)) {
    $min = $temps[0]['value'];
    foreach($temps as $temp) {
      $min = $temp['value'] &lt; $min ? $temp['value'] : $min;
    }
    $entity_field[0]['value'] = $min;
  }
}


Read the documentation page for the computed field module to see the naming convention for adding a custom function. The function name is also visible in the field settings.

In the two functions I refer to 'field_temp'. It is the machine name of the multi-value field holding the temperature values.