check if record exists before adding to PLC