How do I programmatically populate a field if another one is empty? I have a CSV feed running and it currently works perfectly. The client now wants to populate a certain field with a sub-string of another field if the first field is empty, on import. I can't see a way to do that with the normal feeds field mapping or tamper. 

How can I achieve this?
Create a custom module, in mymodule.module use hook_node_update

function mymodule_node_update($node) {

  if (!isset($node-&gt;field_example[LANGUAGE_NONE][0]['value'])) { 
  // If field example is not set (is empty), then...

     $new_value = // ...do some stuff to compute a new value for the field.
     $node-&gt;field_example2[LANGUAGE_NONE][0]['value'] = $new_value;
     field_attach_update('node', $node);

  }

}