add a judge before insert data into myrecord