EMAIL with Lookup Field

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
espo
Veteran Member
Posts: 98
Joined: 2013-03-01 12:55

EMAIL with Lookup Field

Post by espo » 2014-06-24 08:46

Hello to all,

I have a question about the following problem:

I have created two tables.

THE FIRST
id
material

THE SECOND
id
material (gets data from the first table with the Lookup field)
available
fault

I inserted an alert by email when the material reaches 10 pieces or less.

My probema is this:
I would like to include in the email the name of the product, but in Table 2 (using the Lookup Field) I have no name but a number.
Is there a way make it able to see the name of the material and not the number?

Code: Select all

// to compose a message containing the submitted data,
   if ($data['Disponibili'] <= '10'){   

   @mail(
      // mail recipient
      "[email protected]",
      
      // subject
      "ATTENZIONE! Scorta Minima raggiunta per {$data['Apparato']}",
      
      
      // message
      "Ciao {$memberInfo['username']},\n\n".
      "Questo materiale ha raggiunto la scorta minima:\n\n".
      "{$data['Apparato']}\n".
      "Pezzi Disponibili: {$data['Disponibili']}\n\n".
      "Per visualizzare il materiale sul DataBase clicca il link seguente:\n".
      "http://appgini/table_view.php?SelectedID=$id",

      
      // sender address
      "From: [email protected]"
   );
   }
Cattura.JPG
Cattura.JPG (87.88 KiB) Viewed 4534 times
Cattura2.JPG
Cattura2.JPG (21.54 KiB) Viewed 4534 times
Cattura3.JPG
Cattura3.JPG (30.51 KiB) Viewed 4534 times

espo
Veteran Member
Posts: 98
Joined: 2013-03-01 12:55

Re: EMAIL with Lookup Field

Post by espo » 2014-06-26 08:00

Hallo!

There isn't solution for my request?

espo
Veteran Member
Posts: 98
Joined: 2013-03-01 12:55

Re: EMAIL with Lookup Field

Post by espo » 2014-07-03 12:23

I understand that there is no solution ...

Bertv
Veteran Member
Posts: 65
Joined: 2013-12-11 15:59

Re: EMAIL with Lookup Field

Post by Bertv » 2014-07-03 14:05

espo,
there is a solution: you can select the name form the first table with a select:
$materiale = sqlvalue("select Materiale from Materiale_Intralot where id = $data['Apparato']");
Bert
I am using Appgini 5.75

espo
Veteran Member
Posts: 98
Joined: 2013-03-01 12:55

Re: EMAIL with Lookup Field

Post by espo » 2014-07-03 14:38

Thank you very much Bert,

unfortunately, not having great programming knowledge and some steps are not able to find them alone.
Some things I can resolve them, others only with your help!

Post Reply