Announcement

Collapse
No announcement yet.

Search using control appplication

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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

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

    sc_lookupid$query );

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


    Regards

    Comment


    • #3
      Originally posted by kafecadm View Post
      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

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

      sc_lookupid$query );

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


      Regards

      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....

      Comment


      • #4
        I read a little.... I found: using _parent parameter works.

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


        Thank you again!!!!

        Comment


        • #5
          no problem. and btw... también hablo español jajajaja =P

          good luck

          Comment

          Working...
          X