Rewrite View field value I have a Views table that simply shows a list of Entities.

Now at the moment, field 'status' just outputs the raw data 0 or 1.

I want this to be rewritten as 'Pending' or 'Approved' respectively.

I've looked at rewrite behaviour but this seems to be limited and my requirements out of the scope. Everywhere people say that adding PHP through the UI is bad practice.

So how do people normally deal with select boxes stored as integers, when displaying the data using Views?

(Maybe there is a hook to create a function in my module that will always rewrite this field wherever it displays in the Drupal system?)
You could do this several ways, the easiest from a hook standpoint might be to use views_pre_render(), eg, something along the lines of...

function YOURMODULE_views_pre_render(&amp;$view) {

  if ($view-&gt;name=='THE_VIEW_YOU_ARE_LOOKING_FOR') {

     drupal_set_message('&lt;pre&gt;' . print_r($view-&gt;result, TRUE) . '&lt;/pre&gt;'); // to see what you have to work with

     foreach($view-&gt;result as $r =&gt; $result) {
      if ($result-&gt;node_data_field_status_field_status_value) { // or whatever the $result field is you are looking to change from 0 or 1 to Pending or Approved
        $result-&gt;node_data_field_status_field_status_value='Approved';
      } else {
        $result-&gt;node_data_field_status_field_status_value='Pending';
      }
    }

  }

}