FUNCTION csupervisores() DEFINE k1supervisor CHAR(60), dsupervisor SMALLINT, k2supervisor ui.combobox, selec STRING LET k2supervisor = ui.combobox.forname("formonly.num_emp_supervisa") LET selec = "SELECT '('+cast(a.num_emp as varchar(10))+')'+' '+RTRIM(a.nom1_emp)+' '+ISNULL(RTRIM(a.apell1_Emp),' ')+' '+ISNULL(RTRIM(a.apell2_Emp),' '), a.num_emp FROM adtb00003 a inner join adtb00004 b on a.cod_puesto = b.cod_puesto and b.supervisor = 'SI' and a.status_t is null ORDER BY a.nom1_emp" PREPARE comando FROM selec DECLARE bsupervisor CURSOR FOR comando CALL k2supervisor.clear() FOREACH bsupervisor INTO k1supervisor,dsupervisor CALL k2supervisor.additem(dsupervisor,k1supervisor) END FOREACH END FUNCTION