<?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>Workflow</title><link>https://www.infopathdev.com:443/forums/50.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/23442.aspx</link><pubDate>Thu, 04 Oct 2007 12:17:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23442</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23442.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=23442</wfw:commentRss><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;so the steps you want to take are&lt;/p&gt;
&lt;p&gt;1) User presses submit button&lt;/p&gt;
&lt;p&gt;2) Some rules run to email form, then...&lt;/p&gt;
&lt;p&gt;3) Set flag&lt;/p&gt;
&lt;p&gt;One note of caution, if you are sending the form on then setting the flag then you will not be able to submit the form as the &amp;quot;row cannot be located for updating&amp;quot; (for more info search for my post in the database integration forum).&amp;nbsp; You state in your first post that if you put the set flag after the form has been sent it does not appear in the sent form.&amp;nbsp; This is becuase at the time of sending, the form exists in two places, the form you have open with the flag set, and the sent form without the flag set.&amp;nbsp; It will obviously fail if put before the submit as they can cancel.&amp;nbsp; Without writing some heavy-duty code you can use a workaround I have utilised below.&lt;/p&gt;
&lt;p&gt;For example, using an AD Web Service that lets the form know who you are (Or if&amp;nbsp;you are using Infopath 2007).&amp;nbsp; Have your workflow field go from NULL to &amp;#39;a&amp;#39; for with authoriser to &amp;#39;A&amp;#39; openend by authoriser and so on.&amp;nbsp; So the flag is set to &amp;#39;a&amp;#39; before the email is sent.&amp;nbsp; If they click cancel all they are left with is a form they cannot submit any further and it ends there.&amp;nbsp; If they click send the form goes via email to the authoriser and the local form closes.&amp;nbsp; Now set a rule on the form such that is your flag is equal to &amp;#39;a&amp;#39; and the authoriser is equal to the authoriser specified on the form then open the authorisers view, otherwise open a FAILURE view.&amp;nbsp; This would solve your problem without code.&lt;/p&gt;
&lt;p&gt;Any further questions feel free to ask, otherwise I hope this helps.&lt;/p&gt;
&lt;p&gt;Adam&lt;/p&gt;</description></item><item><title>Re: Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/18302.aspx</link><pubDate>Mon, 12 Feb 2007 11:48:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18302</guid><dc:creator>Navid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18302.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=18302</wfw:commentRss><description>Thanks a lot ! &lt;br /&gt;I'm Sorry Patrick !! I didn't mean anything with that sentence. My English isn't good and I apologize &amp; I'm sorry again ... :(:(&lt;br /&gt;&lt;br /&gt;u mean that with coding I can recognize If the mail has been sent or not and I can set fields after that ???&lt;br /&gt;Would u do me a faver &amp; say what is that code look like?&lt;br /&gt;IS there any refrence that learn me coding ?&lt;br /&gt;</description></item><item><title>Re: Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/18301.aspx</link><pubDate>Mon, 12 Feb 2007 08:15:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18301</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18301.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=18301</wfw:commentRss><description>Hey Navid,&lt;br /&gt;&lt;br /&gt;What's with the "Look Patrick" stuff? Your first post was ambiguous and you should just give me a break. I'm doing this for free you know ... :(&lt;br /&gt;&lt;br /&gt;Due to security requirements, InfoPath doesn't allow you to change field values during the e-mail submit between the dialog that InfoPath pops up and the actual submit. If you write code, I think you might be able to get the return value from an e-mail adapter to see if the e-mail was indeed sent, and then you could set your flag field before submitting to another data source. &lt;br /&gt;&lt;br /&gt;Later!</description></item><item><title>Re: Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/18300.aspx</link><pubDate>Mon, 12 Feb 2007 08:10:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18300</guid><dc:creator>Navid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=18300</wfw:commentRss><description>Look Patrick :&lt;br /&gt;The flag is a simple boolean field and it's in the main data source. The form is simple and doesn't have any code behind. The form has a button that Submits as an email message using Rules and sets the flag ...&lt;br /&gt;You Know that when the user click on the submit button (Email) there's a dialog box that show the reciever name and attachment and etc .&lt;br /&gt;I Want if the user click OK , so the flag changes to TRUE. ( it shows that the form has been mailed and other advantages ... )&lt;br /&gt;but if the user click Cancel, ( for example it mean he want to modify the form more ! )&lt;br /&gt;the flag shouldn't change.&lt;br /&gt;-------------------------------&lt;br /&gt;Now in the Rules , if I put the submit action &lt;b&gt;before&lt;/b&gt; set field action , that field (flag) never changes !! because always form has been mailed sooner !&lt;br /&gt;but if I put the submit action &lt;b&gt;after&lt;/b&gt; set field action , it has a little bug. It is that if user click the button, now the flag has been changed to TRUE, but if the user in the mail dialog,click cancel , the form hasn't been changed but the flag has changed to True !!!!</description></item><item><title>Re: Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/18299.aspx</link><pubDate>Sat, 10 Feb 2007 21:49:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18299</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18299.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=18299</wfw:commentRss><description>Hi Navid,&lt;br /&gt;I'm sorry, but I don't understand what you are trying to do. What does the flag control? Is the flag in the main data source? Does the form have code behind it? ?How are you doing the submit? Is this from the main submit data connection or are you using custom rules? Please explain. Thanks!</description></item><item><title>Set a Field correctly after Submitting</title><link>https://www.infopathdev.com:443/forums/thread/18253.aspx</link><pubDate>Sat, 10 Feb 2007 14:20:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18253</guid><dc:creator>Navid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18253.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=50&amp;PostID=18253</wfw:commentRss><description>Hi .&lt;br /&gt;I want to Set a field (a flag) correctly after submitting successfully a form as email !&lt;br /&gt;but the flag remain unchanged when I put the set flag action after submitting action .&lt;br /&gt;if i put the set flag action before submitting, it has a bug :&lt;br /&gt;The operator may want to click "Cancel" in mail dialog box. So the form hasn't been submitted and the flag should remain unchanged, but unfortunetlly it has changed !! &lt;br /&gt;</description></item></channel></rss>