derive_basetype_records function

Derive Basetype Variable