6 Replies Latest reply: May 15, 2014 10:06 AM by joey RSS

    Separate Email Message for Each Detail Line

    joey

      We are considering a new business process that will send a separate email for each line in a report. Each line item would be a separate instance of "work needed" and would be emailed to a common work assignment program that we have.

       

      As we have several reports that we want to convert, Monarch and Data Pump seems like a great solution.  I'm sure I'll need to write a VB .Net script though if I want to send a separate email for every detail line in the report.

       

      Has anyone tackled a similar problem or have any suggestions?

        • Separate Email Message for Each Detail Line
          Olly Bond

          Hello Joey,

           

          If you've already got DataPump v10, then that will support Monarch v10 exports including breaking on key value change in a summary. This makes the job of creating all the exports you need easy, as you could build a summary on Recno() to get a key value change for every detail line in the input report, then it's just a job of automating a distribution for each export using a script.

           

          You might achieve this by exporting to a folder, then having a second monitored  process act on these files and distribute them as inputs by email.  I don't have DataPump v10 yet so can't replicate it,but I'd try to avoid scripting wherever I can

           

          HTH,

           

          Olly

            • Separate Email Message for Each Detail Line
              joey

              I'd considered something similar to that.  I would need to experiement with making sure each input file was processed as a spearate job.

               

              I think this approach would nessitate having the line as an attachment or a link in the email.  It would be nice to have the export in the email (plain text or possibly HTML).

               

              Any experience with anything similar to this?

                • Separate Email Message for Each Detail Line
                  Olly Bond

                  Hello Joey,

                   

                  If you wanted to export the files to one location as an Input Distribution, and to also create a plain text HTML file that you could then click on to retrieve the files if you needed, then you may get some joy making a calculated field as:

                   

                  "Click here"

                  /CODE

                   

                  and using that as your key, if you need to make an HTML link out of it.

                   

                   

                  Best wishes,

                   

                  Olly

                    • Separate Email Message for Each Detail Line
                      joey

                      Sorry if my previous post wasn't clear.

                       

                      I'd like to have the actual export embeded in the message of the email notification from the job, not a link to the export.  I would be exporting plain text.

                       

                      I don't immagine this easy, but wondering if anyone has done somethign similar.

                        • Separate Email Message for Each Detail Line
                          Gareth Horton

                          Joey,

                           

                          You could kick out a simple comma, tab, whatever separated text file, then, in the script, read in each line and create a dynamic distribution for each line, taking whatever info you have in the file to populate the subject, body, recipients etc.

                           

                          There's something vaguely similar in the User Scripting help file, in the examples section.

                           

                          I am not sure we have stress tested the distribution in terms of thousands of distributions in a single proces, if that's what you have in mind though.

                           

                          Gareth

                           

                          Sorry if my previous post wasn't clear.

                           

                          I'd like to have the actual export embeded in the message of the email notification from the job, not a link to the export.  I would be exporting plain text.

                           

                          I don't immagine this easy, but wondering if anyone has done somethign similar.[/QUOTE]

                  • Separate Email Message for Each Detail Line
                    joey

                    Actually, we decided to send as an attachment.  Note that we went with one project file using a key field of the line number, and exporting a separate file for each line number.  The summary hid the key field.  For the export, we sent as an attachment with an option I haven't used before - one file per email.  This was very useful.

                     

                    It doesn't always happen, but Data Pump had just the right options to allow us to do this with a very minimal amount of work.