logic for search by sn in ui