Ok I have simple evaluate function this is call when the combo change the value. then if found the record return "SI" and if not return "NO".
this is the java function
function page1_section1_field1_interactivechange()
{
// insert your code here
ww_selg=Lianja.get("page1.section1").getJSON();
cc_selg=json_encode(ww_selg);
var resultado=Lianja.evaluate("gruposfunction('"+cc_se lg+"')");
Lianja.showMessage('Seleccionando Grupo ..'+resultado);
Lianja.get("page1.section1").refresh();
};
this is my prg function:
gruposfunction.prg
parameter ww_clave
objeto=json_decode(ww_clave)
valor = objeto.field1
save datasession
open database prueba_tablas
if .not. used("encgpo")
use encgpo exclusive in 0
endif
select encgpo
locate eg_nombre = alltrim(valor)
if found()
a1=eg_grupo
restore datasession
return "Si"
else
restore datasession
return "No"
endif
and my output is this:
Bookmarks