Hello,
I have a repeating table on my form with three fields: Recipient, Task, Due Date. For each row of the table I have a button. When the button is clicked I want an email submit to occur with the recipient, task and due date info coming from that particular row. Using code I found on these forums I have come up with the following code. However, when the button from row 2 is pushed, the email adapter wants to submit the email using data from row 1. So it does not appear to be working properly yet. If anyone could help me out with this that would be great.
var objEmailAdapter;
var varTo = eventObj.Source.selectSingleNode("/my:myFields/my:group15/my:group16/my:field75").text;
var varSubject = eventObj.Source.selectSingleNode("/my:myFields/my:group15/my:group16/my:field74").text;
var bodyText = 'You have a new Action Item:\n';
var bodyDue = '\n\nDue Date:\n';
var varIntro = eventObj.Source.selectSingleNode("/my:myFields/my:group15/my:group16/my:field74").text;
var varDue = eventObj.Source.selectSingleNode("/my:myFields/my:group15/my:group16/my:field68").text;
objEmailAdapter = XDocument.DataAdapters("Email Submit");
objEmailAdapter.To = varTo;
objEmailAdapter.Intro = bodyText + varIntro + bodyDue + varDue; objEmailAdapter.Subject = varSubject.text;
objEmailAdapter.Submit();