get records by type (plan or note)