private void populateScreenFromData(HospitalAtNightPatientDetailListVoCollection list) { form.grdWorklist().getRows().clear(); if(list == null || list.size() == 0) return; for(HospitalAtNightPatientDetailListVo record : list) { if(record == null) continue; addHospitalAtNightPatientDetailsRow(record); } form.grdWorklist().setValue(form.getLocalContext().getSelectedInstance()); }