Email Submit and Repeating Tables - InfoPath Dev
in

InfoPath Dev

Email Submit and Repeating Tables

Last post 09-18-2007 01:23 PM by Clay Fox. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-14-2007 04:39 PM

    Email Submit and Repeating Tables

    Hello,

    I have been trying to get something working for a while now, but have not had any luck thus far.  My goal is to have a repeating table on a form that contains a few fields: Email Address, Subject, and Intro.  When the user clicks a button, I want to create an email for each row of the repeating table.  Using this msdn article: http://msdn2.microsoft.com/en-us/library/bb250998.aspx I have my email adapter working great.  However, as expected, it only writes an email for the first row of the repeating table. Can anyone help me write the code so that I can loop through each row of the repeating table and create an email message for each?

     Thanks!

  • 09-17-2007 09:45 AM In reply to

    Re: Email Submit and Repeating Tables

    Do you need a different email for each or can each one be copied on the same email?

    If they can be copied or even BCC'd then you could just concatenate each one with a ; inbetween using a formula.  If they need a different email then you would need to create an email submit for each type.  Another way to do this is use a code module that sends the mail via SNMP and can be done outside of InfoPath. This is more complex but would give you more options of what could be done.

  • 09-17-2007 02:33 PM In reply to

    Re: Email Submit and Repeating Tables

    Hi, thanks for your reply!

    I do need to send a seperate email for each row.  Each email contains only info from its row: recipient, and task.  I'm wondering if I can create some kind of loop with a counter to run through each row of the table.  But I'm not sure how to write the code to refer to a certain row of a repeating table?  If anyone could help me with this, it would be much appreciated. 

  • 09-18-2007 09:42 AM In reply to

    Re: Email Submit and Repeating Tables

    Typically this would be architected in a different way.

    Maybe you send the form to each user but then they only see their tasks. This allows one distribution but then it is smart and identifies the user and shows them what they need.

    Another would be to email a link and then again the form shows them their tasks and maybe they mark them done or have other communication and workflow.

    Or if you have Sharepoint you could post these tasks to a list.

    Or you create one form per assigned task. 

    Another option is to use the Database Accelerator, save the task data to SQL and then have SQL trigger an email to each user based on the data as it is saved to the table.

    If you want to send an email for each task they have then within one form then I would probably recommend using a code based or command line SMTP client which could bulk mail these simple emails out.  Otherwise the person making the assignments would have to manually send each one anyway. Otherwise you would need to loop through and each time change the parameters for the email and ten submit again. The user would press send and then the next would popup.

    I know there are some threads here on using code based email.

    Good luck.

  • 09-18-2007 10:00 AM In reply to

    Re: Email Submit and Repeating Tables

    Thanks for the ideas.  Your first idea looks like it might work for me.  But how do I tell the form to show the user only their tasks?  And do these users need to be in my domain to do this?  If you could point me in the right direction for this I would be most appreciative.

  • 09-18-2007 01:23 PM In reply to

    Re: Email Submit and Repeating Tables

    I always like to identify my form users so that I can record exactly who modified or created the form from a tracking and automating stand point.

    If you implement this with either the User() function in IP2007 or with a WebService like what is included witht he Database Accelerator then you can get thius information and store it in your form and or control how the form reacts depending on the user or their group membership.

    This could be used to choose the view where email address or name matched the user's email address or name in active directory.

    For people outside of the domain this would not work unless you had them self declare who they were up front or something.

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.