<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Email Submission / with if/else subject</title><link>https://www.infopathdev.com:443/forums/thread/14974.aspx</link><pubDate>Wed, 10 Jan 2007 23:00:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14974</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14974.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14974</wfw:commentRss><description>If you are submitting the form to a DB or SharePoint, you should use a link to the form. If you have a completely e-mail based solution it's difficult to allow for form edits since people can always open up an older form by mistake. My suggestion is to not store the forms in Outlook inbox but to store them on a website or DB and use links to them in the e-mail body. &lt;br /&gt;&lt;br /&gt;There have been threads before on the topic of attaching the form programmatically. I seem to recall a discussion 2-3 months ago - not sure how it ended. Maybe that was you... :) Please try to search "e-mail attachment form" or something like that in the forum search (upper right). Good luck.</description></item><item><title>Re: Email Submission / with if/else subject</title><link>https://www.infopathdev.com:443/forums/thread/14973.aspx</link><pubDate>Wed, 10 Jan 2007 22:01:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14973</guid><dc:creator>snyderjd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14973.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14973</wfw:commentRss><description>Thank you for the reply, I am aware of the Fx button using the email data connector, however, there is no option to include the form in the body of the email when using that method... which Is why I am tyring to solve this problem with code... can it be down with script or managed code? Can you point me in any directions? Thanks!</description></item><item><title>Re: Email Submission / with if/else subject</title><link>https://www.infopathdev.com:443/forums/thread/14972.aspx</link><pubDate>Wed, 10 Jan 2007 09:43:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14972</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14972.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14972</wfw:commentRss><description>Hi Snyderjd,&lt;br /&gt;Somehow we missed this over the holidays. Sorry about that! You can use concat function to do this. In the E-mail data connector, click on the Fx button next to Subject and then click on "concat". Click on the parameters and select the fields in your form that you want to concatenate together. You may need to add a few parameters and some text like " - " between time. In addition some of the values may not format real well.</description></item><item><title>Email Submission / with if/else subject</title><link>https://www.infopathdev.com:443/forums/thread/13016.aspx</link><pubDate>Wed, 27 Dec 2006 22:45:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13016</guid><dc:creator>snyderjd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13016.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13016</wfw:commentRss><description>Thank you in advance for any help. I am new to infopath and do not know very much about Jscript. This is what I have. I have a form with several fields that I would like to base my subject on when submitted.&lt;br /&gt;&lt;br /&gt;I do think I have an issue wih my name space... &lt;br /&gt;&lt;br /&gt;the fields I have are: Day, Shift, and Date&lt;br /&gt;&lt;br /&gt;Day is a dropdown menu with Monday - Sunday&lt;br /&gt;Shift is a drop down menu with the following...&lt;br /&gt;Display         Value&lt;br /&gt;1st Shift       5AM - 12PM PST&lt;br /&gt;2nd Shift       12PM - 7PM PST&lt;br /&gt;3rd Shift       7PM - 5AM PST&lt;br /&gt;Saturday        5AM - 5AM PST&lt;br /&gt;Sunday          5AM - 5AM PST&lt;br /&gt;Holiday         5AM - 5AM PST&lt;br /&gt;&lt;br /&gt;And the last a date picker field formated as mm/dd/yy&lt;br /&gt;&lt;br /&gt;Based on the Shift and day selected I need to have the Subject of the email formated in the following standard&lt;br /&gt;&lt;br /&gt;Examples 1st shift weekday &amp; a weekend or holiday&lt;br /&gt;Shift Turnover - Monday mm/dd/yy 5AM - 12PM PST &lt;br /&gt;Shift Turnover - Saturday mm/dd/yy 5AM - Sunday mm/dd/yy 5AM&lt;br /&gt;&lt;br /&gt;I would prefer not use managed code as I do no know how to inlcluded the form in the body of the email any aother way than I am doing now... Here is what I have so far from the MSE... I also think I might have a problem with my namespace... &lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt; * This file contains functions for data validation and form-level events.&lt;br /&gt; * Because the functions are referenced in the form definition (.xsf) file, &lt;br /&gt; * it is recommended that you do not modify the name of the function,&lt;br /&gt; * or the name and number of arguments.&lt;br /&gt; *&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// The following line is created by Microsoft Office InfoPath to define the prefixes&lt;br /&gt;// for all the known namespaces in the main XML data file.&lt;br /&gt;// Any modification to the form files made outside of InfoPath&lt;br /&gt;// will not be automatically updated.&lt;br /&gt;//&amp;lt;namespacesDefinition&amp;gt;&lt;br /&gt;XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-12-22T21:08:17"');&lt;br /&gt;//&amp;lt;/namespacesDefinition&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//=======&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function SubmitBtn::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	createEmail()	// Calls email function&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function createEmail() //creates email&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//var xmlShift = XDocument.DOM.selectSingleNode("//my:TurnOver/my:ShiftInfo/my:Shift");&lt;br /&gt;//var xmlDate = XDocument.DOM.selectSingleNode("/my:TurnOver/my:ShiftInfo/my:TodaysDate");&lt;br /&gt;//var xmlDay = XDocument.DOM.selectSingleNode("/my:TurnOver/my:ShiftInfo/my:Day");&lt;br /&gt;	try&lt;br /&gt;		{&lt;br /&gt;		var oEnvelope = XDocument.View.Window.MailEnvelope;&lt;br /&gt;	&lt;br /&gt;		oEnvelope.To = ("email@company.com;");&lt;br /&gt;		oEnvelope.Subject = ("Shift Turnover - ")&lt;br /&gt;		oEnvelope.Visible = true;&lt;br /&gt;		&lt;br /&gt;		&lt;br /&gt;		}&lt;br /&gt;	catch (ex)&lt;br /&gt;		{&lt;br /&gt;		XDocument.UI.Alert(ex.description);&lt;br /&gt;		}&lt;br /&gt;}</description></item></channel></rss>