11 Replies Latest reply on Oct 25, 2012 2:22 PM by philmodjunk

    Exporting Data

    jb_1

      Title

      Exporting Data & sending in specific mail!!!

      Post

           Hi,

           I have a list of Cars in a table , contaning all informations of every Car.

           what I secced to do is: from the web browser ; USER chose what Cars (he cabn choose more than1) he want to export their Records (informations), Records will be saved in a table " REquestExport" :  list of cars, user_login(automatiqually entry),Datecreation record and  address_ mail_users.; Than , I use a scheddle script (in server) that perform find which record_status are " Open ", export records from the table "RequestRecord" and send mail (".XLS") to all USers, then he turned this status to "Closed" !!!

           What I want to do is , sending mail ONLY to users which chosing the lists , for exemple; User A chose 2 lists to export them; I want JUST to send mail to USER A contaning ONLY the 2 lists which he choosed. Other USER reseive Their specific Lists choosed before.

           the layout contain:

           Lists of CArs         Status         User_Login                    Mail                            Date       

        • 1. Re: Exporting Data & sending in specific mail!!!
          philmodjunk

               What options are you selecting for the recipient's email address in the send mail script step?

               The RequestExport table should contain a field for the email address of the recipient and your send mail step should use that email address and only that email address to send out the attached excel file.

          • 2. Re: Exporting Data & sending in specific mail!!!
            jb_1

            Hi;

            Im using to send mail ; specify address mail a vaiabl $$mail from an other table :

            RequestExport table already contains a field for the recipient's email address in each record, each model contains a list of field recording + the user ID+ the address mail field . the problem is that my script sends the mail to all users containing the Excel file that contains all the recordings (all stored lists) of all users.

            • 3. Re: Exporting Data & sending in specific mail!!!
              philmodjunk

                   And how does the variable get the email address from the Request Export table?

                   I can't see any way for this process to send an email out to all email addresses unless you are selecting the "multiple emails (one for each record in found set)" option in the send mail script step. This option should not be used for this script.

              • 4. Re: Exporting Data & sending in specific mail!!!
                jb_1

                     Im Not selecting the "multiple emails (one for each record in found set)" option in the send mail script step.I use One mail using DTA record!!!

                     the variable get the mail from the mailField  (Table::MailField) , and this mail field contain the address from an other table !!!

                     but , know ,I supose that the problem is from the LIST , if you remember , because you helprd me to create a value list from a Global List in previous time!! the attached file contain all the list , thuis is why I have a mlukltiple mail for all users!!!

                • 5. Re: Exporting Data & sending in specific mail!!!
                  philmodjunk

                       There is no attached file. FileMaker files cannot be uploaded to this forum. You can, however, upload a copy to a file sharing site such as Drop Box and then post the download link here.

                       The list function should not be used here for specifying the email address. YOu want just one email address in the variable and then just that variable listed in the TO box.

                  • 6. Re: Exporting Data & sending in specific mail!!!
                    jb_1

                         I suupose that the question is : how can I save a global list to a portal row , for exemple , a List of "Name" ; I want to make tgis list in a portal , than , relate the other data , number, status,.... is it possible from a global list to a portal records???

                    • 7. Re: Exporting Data & sending in specific mail!!!
                      philmodjunk

                           It's certainly possible, but I don't understand why you would need to do so for this particular task. Your original question was why your send mail was sending out the same email to multiple recipients. Is that still the issue here?

                      • 8. Re: Exporting Data & sending in specific mail!!!
                        jb_1

                         "Your original question was why your send mail was sending out the same email to multiple recipients."

                        this is the problem!! I want to do Just the otherwise.!!!I want to send Out every mail to the specific recipients; every isers select a list , he want to receive a mail from the server which contain JUST "their selected List". Thnk you  (  many mails will be send out to many recipients, each mail to one of this recipients)

                        • 9. Re: Exporting Data & sending in specific mail!!!
                          philmodjunk

                               I'm afraid that I don't understand what you have in mind. Can you describe that in more detail? Many of your posts are very difficult to understand as they lack key information about what you are trying to accomplish.

                          • 10. Re: Exporting Data & sending in specific mail!!!
                            jb_1

                                 Hi;

                                 what suers want to do is receiving mail from the databvase wich contain their List selected from the web browser.

                                 well; I do a script , scheddle script, that export records , in my exemple, export lists where  is "open "( I mein with "open" , those who's not exported before) then send their to user .This scheddle script run in a server every 20mn , but , I see that the "loop" fonction does not run in scheddle script..

                                 why  im usding a scheddle and a loop fonction!! this script find the records who is "open"; and return a mail to user conatin every record list found one by one .. this is why i used "loop" in my scheddle script!! is that a solution for that loop !!??

                            • 11. Re: Exporting Data & sending in specific mail!!!
                              philmodjunk

                                   It's still very hard to follow your descriptions.

                                   A single step should pull up the found set of records requested by a single user. Then the next step exports the data into a file and the next step after that emails it. No loop for that part of the process should be necessary.

                                   The only need for a loop is to process multiple requests that may have been submitted since the last time that the scheduled script was performed.

                                   Here's a step by step outline of what I understand you to want:

                                   1) User on web site fills out a request form with either criteria for web form or a list of record ID and the email address to which they want the data sent

                                   2) This may occur from multiple users all at about the same time....

                                   3) A scheduled script on the server performs a find on the Export Request table to find all newly added export request records. Each record represents a single request by a single user of your web site.

                                   4) For each record found....

                                   5) find the records listed or specified.

                                   6) export the data to an Excel file

                                   7) Send an email to the speciifed address in the Export Request file with the excel file attached to the email

                                   8) Repeat for next record in Export Request Table  until all new requests have been processed.

                                   Is any of that incorrect?