Add encoding of record data type