add a new function for query the record by preparationend