Search using control appplication

Hola,

En una aplicacion formulario no puedo utilizar las b?squedas que ya existen en la barra de herramientas porque mis campos de busqueda estan encryptados con AES_ENCRYPT().
Por ello para poder realizar la busqueda, estoy necesitando saber como configurar una aplicacion de control en el cual busque el apellido de una persona en un select list, y retornar el ID de la persona a la aplicacion “formulario” principal. Con ese ID automaticamente me posicione en el registro que corresponde al id. La aplicacion ya la hice y el select list tambien, solo que no se como hacer la acci?n para que al “validar” en el aplicacion de control, me posicione en la aplicacion de formulario con el id que seleccion?.

Por favor necesito sugerencias!!!
Gracias!!!

Hello, In my form application I cannot use toolbar search, because my search fields are encrypted using AES_ENCRYPT().
In order to resolve my problem, I need how to set a control application in which I can select some fileds looking up the id. This ID have to return to main form applicacion and seek to row. I need to know how to do the last step.

Please some suggestion?

Thak you

Ok actually you just answered yourself man.

All you need to do is to create a control application with the fields you wanna search for… in this case last name right?.. well create the form with such field and in the onvalidate event simply do something like


$query= "SELECT <id> FROM <table> WHERE <last name field> = '" . AES_ENCRYPT({lastnamefield}) . "'";

sc_lookup( id, $query );

if (isset({id[0][0]}));
{
   sc_redir( myform, id={id[0][0]});
}
else
{
   sc_error_message('not found');
}


Regards

[QUOTE=kafecadm;35489]Ok actually you just answered yourself man.

All you need to do is to create a control application with the fields you wanna search for… in this case last name right?.. well create the form with such field and in the onvalidate event simply do something like


$query= "SELECT <id> FROM <table> WHERE <last name field> = '" . AES_ENCRYPT({lastnamefield}) . "'";

sc_lookup( id, $query );

if (isset({id[0][0]}));
{
   sc_redir( myform, id={id[0][0]});
}
else
{
   sc_error_message('not found');
}


Regards[/QUOTE]

Thank you for your help, your time and and your effort to understand my bad english grammar!!! this worked! The question now is, exists any parameter in order to redir to the first form where I called control ? Now opens form over form…

I read a little… I found: using _parent parameter works.

sc_redir( Form_personas, idpersona={id[0][0]}, “_parent”);

Thank you again!!!

no problem. and btw… tambi?n hablo espa?ol jajajaja =P

good luck