Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Runtime Error › Runtime Error
In your message from SQL:
<LoopMessage_IdeaSend_Resp>
<ot>
<ut>
<RMail>zasds</RMail>
</ut>
<orderID>hfh </orderID>
<status>fgfdg</status>
</ot>
</LoopMessage_IdeaSend_Resp>
How does this message loop. Are there multple <ot> nodes or multiple <ut> nodes.
Do you get one <ot> record that you email to multiple people or do you have multiple <ot> records that each get mailed to one person?
What message are you sending via email?
When does the loop stop?
Your xpath seems to have an error:
[quote:0c3aa6b6a4]Xpathst = system.string.Format(\”/*[local-name()=’LoopMessage_IdeaSend_Resp’]/*[local-name()=’ot’]/*[local-name()= ‘ut’]{[0]}\”,i) [/quote:0c3aa6b6a4]The brackets around the format variable should be the other way [{0}] or you could use the position() function.
Have you considered extracting the email address into a string variable rather than a message.
[code:1:0c3aa6b6a4]Xpathst = system.string.Format(\"string(/*[local-name()=’LoopMessage_IdeaSend_Resp’]/*[local-name()=’ot’]/*[local-name()= ‘ut’ and position()={0}]/*[local-name()=’RMail’])\",i)
emailVar = xpath(Insert_idea_Resp.parameters, Xpathst);
Address = \"mailto:\" + emailVar;[/code:1:0c3aa6b6a4]