Re: [WebDNA] multi [sendmail] inside [search]

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 109300
interpreted = N
texte = Hi Mike, I do have notices being sent each time there is an employee 'in' or = 'out'. Many times they reach 40 hours in the middle of a shift, and the boss = wants to know that, so I do an hourly search of the records. The employees are on the road, and can't always reach the boss, etc. There is nobody to monitor the situation hourly, so he wants it done = automatically. I am using lookup where I can to speed things up. Thanks for the advice. sfb On Jul 13, 2012, at 1:56 PM, Michael A. DeLorenzo wrote: > Does it make more sense if you run the search and possibly send your = email > each time someone submits a new record? I'm not sure how your database = is > setup but you could just search the total hours for a given period = each time > an employee submits there time. If the total exceeds 40 hours once the = time > is recorded you could show the user/employee a reminder and send an = email to > the boss. Your search would be fast as it would only be on that one = user > instead of the entire database. Depending on how you record the totals = you > could even do a faster lookup instead. I'm guessing the system returns = a > total to the user showing them how many hours they have accumulated? = You > could possibly use that total and show or hide the code to send the = email > and avoid a duplicate search altogether. >=20 > My two cents.... >=20 > Mike >=20 > -----Original Message----- > From: Govinda [mailto:govinda.webdnatalk@gmail.com]=20 > Sent: Friday, July 13, 2012 1:38 PM > To: talk@webdna.us > Subject: Re: [WebDNA] multi [sendmail] inside [search] >=20 >>=20 >>>> The problem is, WebDNA doesn't like using a [sendmail] tag inside = of=20 >>>> a [search...][founditems] routine. >>>=20 >>> Of course it does, I've been doing this for years. What seems to be=20= >>> the problem that causes you to say this? >>=20 >>=20 >> The simple problem is that it won't work... >> Here's a sample.... >>=20 >> [search db=3D../login/website_users.db& code..blah..code...] >> [founditems]  =20 >> code..blah..code... >> [showif code..blah..code... >> [loop start=3D[ code..blah..code...] >=20 >> [text] message =3D >> [showif code..blah..code... >> [/showif] >> [/text] >> [/loop] >> [/showif] =20 >>  [sendmail > to=3Dtimeclock@domain.com&from=3DWebpage@domain.com&subject=3DStaff = Over 40 > message (no reply)&content-type=3Dtext/html] >> [message] >> [/sendmail] >> code..blah..code... >> [/founditems] >> [/search] >>=20 >> But this does work, but with only the last item found.... >>=20 >> [search db=3D../login/website_users.db& code..blah..code...] >> [founditems]  =20 >> code..blah..code... >> [showif code..blah..code... >> [loop start=3D[ code..blah..code...] >=20 >> [text] message =3D >> [showif code..blah..code... >> [/showif] >> [/text] >> [/loop] >> [/showif] =20 >> code..blah..code... >> [/founditems] >> [/search] >>=20 >> [sendmail to=3Dtimeclock@domain.com&from=3DWebpage@ > domain.com&subject=3DStaff Over 40 message (no = reply)&content-type=3Dtext/html] >> [message] >> [/sendmail] >=20 >=20 >=20 > Stephen, I also have sent mail using [sendmail] countless times inside = a > [search][founditems]... >=20 > But anyway, as far as the above code (latter example) only sending one > email.. well that makes perfect sense (looking at the code you wrote). = If > you want 3 emails to go out, you have to write out 3 [sendmail]'s = ...or put > the [sendmail] inside a loop that will fire 3 times (like inside > [founditems] ;-) .. or inside [loop], or inside [listwords], or inside > whatever other loop serves you best. If you do not want to debug why > [sendmail] was failing inside [founditems] on your first attempt, then = you > could rewrite your latter attempt, like so: >=20 > [search db=3D../login/website_users.db& code..blah..code...] > [founditems]  =20 > code..blah..code... > [showif code..blah..code... > [loop start=3D[code..blah..code...] > [text]message_[index] =3D > [showif > code..blah..code...[/showif] > [/text] > =09 > [text]NumTimesLoopFired=3D[index][/text][!]<--- 1.) this might go = here, or > else below---[/!] > [/loop] > [/showif] =20 > code..blah..code... > [text]NumTimesLoopFired=3D[index][/text][!]<--- 2.) this = might > go here, or else above---[/!] > [/founditems] > [/search] >=20 > [loop start=3D1&end=3D[NumTimesLoopFired]&advance=3D1] > [sendmail to=3Dtimeclock@domain.com&from=3DWebpage@ > domain.com&subject=3DStaff Over 40 message (no = reply)&content-type=3Dtext/html] > [interpret][message_[index]][/interpret] > [/sendmail] > [/loop] >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to the mailing = list > . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] multi [sendmail] inside [search] (WebDNA Solutions 2012)
  2. Re: [WebDNA] multi [sendmail] inside [search] ("Terry Wilson" 2012)
  3. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  4. Re: [WebDNA] multi [sendmail] inside [search] (William DeVaul 2012)
  5. Re: [WebDNA] multi [sendmail] inside [search] ("Terry Wilson" 2012)
  6. Re: [WebDNA] multi [sendmail] inside [search] (Govinda 2012)
  7. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  8. Re: [WebDNA] multi [sendmail] inside [search] (Terry Wilson 2012)
  9. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  10. Re: [WebDNA] multi [sendmail] inside [search] (WebDNA Solutions 2012)
  11. Re: [WebDNA] multi [sendmail] inside [search] (Stuart Tremain 2012)
  12. Re: [WebDNA] multi [sendmail] inside [search] (Stuart Tremain 2012)
  13. Re: [WebDNA] multi [sendmail] inside [search] (Govinda 2012)
  14. Re: [WebDNA] multi [sendmail] inside [search] (Terry Wilson 2012)
  15. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  16. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  17. RE: [WebDNA] multi [sendmail] inside [search] ("Michael A. DeLorenzo" 2012)
  18. Re: [WebDNA] multi [sendmail] inside [search] (Govinda 2012)
  19. Re: [WebDNA] multi [sendmail] inside [search] (WebDNA Solutions 2012)
  20. Re: [WebDNA] multi [sendmail] inside [search] (Tom Duke 2012)
  21. Re: [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
  22. Re: [WebDNA] multi [sendmail] inside [search] (WebDNA Solutions 2012)
  23. [WebDNA] multi [sendmail] inside [search] (Stephen Braun 2012)
Hi Mike, I do have notices being sent each time there is an employee 'in' or = 'out'. Many times they reach 40 hours in the middle of a shift, and the boss = wants to know that, so I do an hourly search of the records. The employees are on the road, and can't always reach the boss, etc. There is nobody to monitor the situation hourly, so he wants it done = automatically. I am using lookup where I can to speed things up. Thanks for the advice. sfb On Jul 13, 2012, at 1:56 PM, Michael A. DeLorenzo wrote: > Does it make more sense if you run the search and possibly send your = email > each time someone submits a new record? I'm not sure how your database = is > setup but you could just search the total hours for a given period = each time > an employee submits there time. If the total exceeds 40 hours once the = time > is recorded you could show the user/employee a reminder and send an = email to > the boss. Your search would be fast as it would only be on that one = user > instead of the entire database. Depending on how you record the totals = you > could even do a faster lookup instead. I'm guessing the system returns = a > total to the user showing them how many hours they have accumulated? = You > could possibly use that total and show or hide the code to send the = email > and avoid a duplicate search altogether. >=20 > My two cents.... >=20 > Mike >=20 > -----Original Message----- > From: Govinda [mailto:govinda.webdnatalk@gmail.com]=20 > Sent: Friday, July 13, 2012 1:38 PM > To: talk@webdna.us > Subject: Re: [WebDNA] multi [sendmail] inside [search] >=20 >>=20 >>>> The problem is, WebDNA doesn't like using a [sendmail] tag inside = of=20 >>>> a [search...][founditems] routine. >>>=20 >>> Of course it does, I've been doing this for years. What seems to be=20= >>> the problem that causes you to say this? >>=20 >>=20 >> The simple problem is that it won't work... >> Here's a sample.... >>=20 >> [search db=3D../login/website_users.db& code..blah..code...] >> [founditems]  =20 >> code..blah..code... >> [showif code..blah..code... >> [loop start=3D[ code..blah..code...] >=20 >> [text] message =3D >> [showif code..blah..code... >> [/showif] >> [/text] >> [/loop] >> [/showif] =20 >>  [sendmail > to=3Dtimeclock@domain.com&from=3DWebpage@domain.com&subject=3DStaff = Over 40 > message (no reply)&content-type=3Dtext/html] >> [message] >> [/sendmail] >> code..blah..code... >> [/founditems] >> [/search] >>=20 >> But this does work, but with only the last item found.... >>=20 >> [search db=3D../login/website_users.db& code..blah..code...] >> [founditems]  =20 >> code..blah..code... >> [showif code..blah..code... >> [loop start=3D[ code..blah..code...] >=20 >> [text] message =3D >> [showif code..blah..code... >> [/showif] >> [/text] >> [/loop] >> [/showif] =20 >> code..blah..code... >> [/founditems] >> [/search] >>=20 >> [sendmail to=3Dtimeclock@domain.com&from=3DWebpage@ > domain.com&subject=3DStaff Over 40 message (no = reply)&content-type=3Dtext/html] >> [message] >> [/sendmail] >=20 >=20 >=20 > Stephen, I also have sent mail using [sendmail] countless times inside = a > [search][founditems]... >=20 > But anyway, as far as the above code (latter example) only sending one > email.. well that makes perfect sense (looking at the code you wrote). = If > you want 3 emails to go out, you have to write out 3 [sendmail]'s = ...or put > the [sendmail] inside a loop that will fire 3 times (like inside > [founditems] ;-) .. or inside [loop], or inside [listwords], or inside > whatever other loop serves you best. If you do not want to debug why > [sendmail] was failing inside [founditems] on your first attempt, then = you > could rewrite your latter attempt, like so: >=20 > [search db=3D../login/website_users.db& code..blah..code...] > [founditems]  =20 > code..blah..code... > [showif code..blah..code... > [loop start=3D[code..blah..code...] > [text]message_[index] =3D > [showif > code..blah..code...[/showif] > [/text] > =09 > [text]NumTimesLoopFired=3D[index][/text][!]<--- 1.) this might go = here, or > else below---[/!] > [/loop] > [/showif] =20 > code..blah..code... > [text]NumTimesLoopFired=3D[index][/text][!]<--- 2.) this = might > go here, or else above---[/!] > [/founditems] > [/search] >=20 > [loop start=3D1&end=3D[NumTimesLoopFired]&advance=3D1] > [sendmail to=3Dtimeclock@domain.com&from=3DWebpage@ > domain.com&subject=3DStaff Over 40 message (no = reply)&content-type=3Dtext/html] > [interpret][message_[index]][/interpret] > [/sendmail] > [/loop] >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to the mailing = list > . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Stephen Braun

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) international time (1997) WebDNA Solutions ... sorry! (1997) Re:Emailer and encryption (1997) HELP!? (2002) Signal Raised Error (1997) method of payment (1997) HTML Editors (1997) More help for discount pricing (1998) Huge databases and RAM (1998) presetting variables ... (2000) [SHOWIF]s and empty arguments (1997) OOps - Diners Club card problems (1999) Two submit buttons ? (1997) [WebDNA] Is there a good file upload script available these days? (2009) [WebDNA] Styling search results (2009) Secure server question (1997) Re2: AAgghh!! Help, please. SSL strikes again. (1997) HTML docs are wrong about listwords ... (2000) Pass a form (2003)