Skip to main content
Nintex Community Menu Bar

Using SmartObjects (or mail events directly) with repeating InfoPath fields

  • November 24, 2008
  • 3 replies
  • 21 views

Forum|alt.badge.img+3

Hi all,

I'm using the contact selector in InfoPath (browser-enabled).

This contact selector fills a repeating group with user ids. Now I want to send a mail to each of them.

I tried some different approaches but ended up with the need of a SmartObject. My problem is: How to create a smartbox entry for each of the repeating fields?

Any other ideas are very welcome.

marco

3 replies

Forum|alt.badge.img+3

I assume you have workflow behind this InfoPath form that will send the email...?


If you do, then I would suggest that you submit the form normally (not populating the SmartObject yet), then have your first event be a Server Event.  In the server event open the XML document, loop through the xml schema, and after each loop do your insert in to the SmartObject.


 The code to do this can be found by searching. Essentially your Server Event reads from the XML and writes to the SmartObject, and the Mail event then reads from your SmartObject.  Your mail event may also need to loop through the SmartObject.  If this is the case, then create another Server Event, a Process DataField for a counter and loop between the Server Event (separate server event to the one mentioned previously) and the Mail Event.


 


Forum|alt.badge.img
  • November 25, 2008

Hi marco, check out the following post for "Activity Destination Users based upon a Repeating XML element: http://k2underground.com/blogs/fromthebench/archive/2008/05/22/activity-destination-users-based-upon-a-repeating-xml-element.aspx


Forum|alt.badge.img+3
  • Author
  • Nintex Partner
  • November 25, 2008

Thank you.

But I'm already know that I can use a repeating field as the destination.

I think my problem can only be solved by custom code, so I did it with a server code event and iterate through the repeating nodes and call my SmartObject to get the mail address from each username and add it to a process data field (; separated). Then I use this for the mail to.

marco