Custom field default value with counter

I don’t know how the pods framework works so I can’t tell you how to set the value but I can get you started.

First, don’t store your entire “machine %n” string. The “machine” part it going to be the same for all entries, correct? Then just save the “%n“.

Now, when you need to add a new post …

function get_next_reference_number() {
  global $wpdb;
  $ref = $wpdb->get_var("SELECT MAX(meta_value) FROM {$wpdb->postmeta} WHERE meta_key = 'reference_number'");
  return (!empty($ref)) ? $ref + 1 : 1;
}

Hopefully you can work that into your Pods code.