<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/72812.aspx</link><pubDate>Fri, 09 Dec 2011 18:59:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72812</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72812.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=72812</wfw:commentRss><description>This is actually a super old thread, and was talking about regular InfoPath forms with workflow, not a workflow task form.</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/72101.aspx</link><pubDate>Wed, 16 Nov 2011 04:04:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72101</guid><dc:creator>mykey06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72101.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=72101</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi... I was wondering how were you able to add a file attachment control to a SharePoint InfoPath task form. That control cannot be found on InfoPath 2010 for my SharePoint 2010 workflow task forms. Thanks in advance!!!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/40782.aspx</link><pubDate>Tue, 21 Apr 2009 11:45:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40782</guid><dc:creator>testuser</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40782.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40782</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;is there such a tool also for WSS 2003 and InfoPath 2003 available? &lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/32476.aspx</link><pubDate>Tue, 23 Sep 2008 18:14:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32476</guid><dc:creator>s42bm</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32476.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32476</wfw:commentRss><description>&lt;p&gt;Because I don&amp;#39;t know what exactly you need, I just provide you a possible solution based on my assumption.&lt;/p&gt;&lt;p&gt;In a workflow, we create a task and link it to a task form consisting of an attachment type field. When the form being sent back, we have attached document as a string. In OnTaskChanged activity, we can get the document and put it somewhere on your sharepoint site.&lt;/p&gt;&lt;p&gt;Using OnTaskChange_AfterProperties.ExtendedProperties[&amp;quot;field_name&amp;quot;] to get the attachment as a string. Pass this string to a function to put it back in a file. The following link showed how to dig the content out from the string. Good luck!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;http://blogs.msdn.com/pranab/archive/2007/07/02/how-to-add-the-attachment-from-an-infopath-2007-form-to-a-document-library.aspx&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/32422.aspx</link><pubDate>Mon, 22 Sep 2008 09:57:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32422</guid><dc:creator>jeeva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32422.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32422</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Hilary,&lt;/p&gt;&lt;p&gt;&amp;nbsp;How&amp;nbsp; can i solve this problem using Workflow tasks.&lt;/p&gt;&lt;p&gt;Could you please explain step by step procedures to this issue.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/32420.aspx</link><pubDate>Mon, 22 Sep 2008 09:42:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32420</guid><dc:creator>jeeva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32420.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32420</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi &lt;/p&gt;&lt;p&gt;I am new to this Infopath Forms.I have a same problem.&lt;/p&gt;&lt;p&gt;My scenario is i have&amp;nbsp; attached file in my form, but i am not able to publish this attached file to sharepoint library.&lt;/p&gt;&lt;p&gt;how can i get my attached file link.&lt;/p&gt;&lt;p&gt;could u tell me in step by step procedure of this solution. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31685.aspx</link><pubDate>Mon, 25 Aug 2008 19:42:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31685</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31685.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31685</wfw:commentRss><description>&lt;p&gt;Are you comfortable with C#? You won&amp;#39;t need everything in that sample in the FormCode.cs. &lt;/p&gt;
&lt;p&gt;I&amp;#39;d create an onAfterChange event on the attachement control and add two of the methods to your form code -- DecodeAttachment and GetAttachmentName. You can pass DecodeAttachment the text value of your file attachment node to get back a byte array, and you can pass the entire node to GetAttachmentName to get back the file name you&amp;#39;ll need when you go to save the file off. &lt;/p&gt;
&lt;p&gt;The Microsoft link I pointed you to earlier has a method called SaveAttachment that you should be able to use to write it all off to the file system. &lt;/p&gt;
&lt;p&gt;Let me know if you get stuck, okay?&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31684.aspx</link><pubDate>Mon, 25 Aug 2008 19:30:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31684</guid><dc:creator>feesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31684.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31684</wfw:commentRss><description>&lt;p&gt;No need to apologies. You have been very helpful.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just to clarify - all I need to do is put the modified code from your example in the onAfterChange event? No extra files are needed to somehow be included in the form?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31682.aspx</link><pubDate>Mon, 25 Aug 2008 19:12:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31682</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31682.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31682</wfw:commentRss><description>&lt;p&gt;Sorry, Chris! I should have been more precise. No custom control needed, just add the normal InfoPath file attachment control. After you read the contents off, decode into a new file and save someplace, you can set the text value back to blank so that you aren&amp;#39;t storing that bulky file. You could even use some conditional formatting to decide when to show/hide the file control, and add another field (again, see my earlier link for the conversation on linking to a file in InfoPath, you may have to manipulate things a bit) that you will use to store the link to the file. &lt;/p&gt;
&lt;p&gt;That way, the user adds the file using the normal IP experience, and, like magic, the file gets stored off someplace else and they are left with a link.&lt;/p&gt;
&lt;p&gt;Oh, and in your onAfterChange, for you decode stuff, do it in an if statement that checks to make sure the event is an &amp;#39;Insert&amp;#39; event, like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; ( !e.Operation.Equals(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Insert&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;/font&gt;&lt;/blockquote&gt;
&lt;p&gt;That way your event won&amp;#39;t run twice... although, you&amp;#39;ll probably want to do something on Delete, too, so that if your user choses to get rid of the file they selected, it isn&amp;#39;t hanging out where you wrote it off to, cluttering up the place.... &lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31681.aspx</link><pubDate>Mon, 25 Aug 2008 18:47:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31681</guid><dc:creator>feesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31681.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31681</wfw:commentRss><description>&lt;p&gt;Hi Hilary&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I think your pointing me in the right direction and while I haven&amp;#39;t gotten my hands dirty yet, I should be able to atleast decode the name and use it to open a file. &lt;/p&gt;
&lt;p&gt;That being said, I am still unclear how to apply all this. How does this code run in the form? Do you put the default attachment control on the form and call the code you wrote in VS in an on change event?? Or does this create a custom control? I am still uncertain how this works.&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31680.aspx</link><pubDate>Mon, 25 Aug 2008 17:06:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31680</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31680.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31680</wfw:commentRss><description>&lt;p&gt;Hi, Chris:&lt;/p&gt;
&lt;p&gt;As far as why the name turns to gibberish when the attachment is opened from InfoPath and what to do about it -- I don&amp;#39;t know that one. However, if you write the file off someplace and exchange it with a link, that problem may go away. &lt;/p&gt;
&lt;p&gt;Here is what I would suggest. In the OnAfterChange event of your file attachment control, you should be able to add some code that uses the sample provided in that link in the &amp;quot;Create a Decoder Class&amp;quot; section to write to a network share. &lt;/p&gt;
&lt;p&gt;In the sample, if you unzip it and look at some of the files with notepad, you should be able to get an idea of what is going on even though you can&amp;#39;t run it in Visual Studio. FormCode.cs has methods to get the attachement name and decode it, and the task pane in the form (tpRouting.htm) actually sends the file off to SharePoint. &lt;/p&gt;
&lt;p&gt;As far as the type of control to place your new file link in -- if it is on a network share, you may experience a little pain -- I found &lt;a href="http://www.infopathdev.com/forums/p/7430/30661.aspx"&gt;this&lt;/a&gt; post at this site that discusses it a bit. &lt;/p&gt;
&lt;p&gt;I&amp;#39;d start simply -- figure out how to decode and write out your file, then start working on how to get the user back to that file from your form....Let me know if you need more concrete help, I realize this is pretty conceptual.&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31679.aspx</link><pubDate>Mon, 25 Aug 2008 15:28:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31679</guid><dc:creator>feesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31679.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31679</wfw:commentRss><description>&lt;p&gt;Hi Hilary&lt;/p&gt;
&lt;p&gt;I think the example you posted is what I am looking for to help solve a problem I am having however the only issue is that I can&amp;#39;t open the example because it was created in a newer version of Visual Studio then the one I have (which is 2003). Is there another example for VS 2003 or is there an easy way to explain what is going on?&lt;/p&gt;
&lt;p&gt;My problem is really two fold. First I am having an issue with file sizes getting to big and it causing delays to save/open the form. In this case creating a link to open a file that is actually stored either on a network drive or sharepoint site should help this I imagine. The other issue is documented in my post here: &lt;a href="http://www.infopathdev.com/forums/t/8896.aspx"&gt;http://www.infopathdev.com/forums/t/8896.aspx&lt;/a&gt;. If you can provide any help it would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31574.aspx</link><pubDate>Wed, 20 Aug 2008 14:21:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31574</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31574.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31574</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m afraid I have had very little experience with workflow, so you&amp;#39;d need to try it to find out.... I would assume you could use the code in the changed event of the field that the file is being attached to, so that when a file is attached to the form it is immediately saved to another site and replaced with a link. If you use the task pane for this activity, the user will be able to continue working in the form without any delays. I think either approach is valid, but if you find that one is better than the other, do post and let us know, that would be helpful information for the community.&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31573.aspx</link><pubDate>Wed, 20 Aug 2008 13:19:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31573</guid><dc:creator>s42bm</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31573.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31573</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Hilary,&lt;/p&gt;&lt;p&gt;I read the sample code you showed me, it&amp;#39;s very helpful. I have a workflow that has an InfoPath form as its task form. May I extract the attachment within this task form in the workflow instead of handling by the code on form submission and practically which approach is better? Thank you!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to get the attached file out from task form</title><link>https://www.infopathdev.com:443/forums/thread/31531.aspx</link><pubDate>Tue, 19 Aug 2008 11:37:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31531</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31531.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31531</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;
&lt;p&gt;There is also a sample &lt;a href="http://www.infopathdev.com/files/folders/examples/entry29401.aspx"&gt;here&lt;/a&gt; that may help you. This sample form copies the attachment to a SharePoint document library and creates a link in your form to the attachment. Give it a try -- let me know if you need help with it!&lt;/p&gt;</description></item></channel></rss>