<?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: open infopath 2003 form from sharepoint 2007 document list and pre-populate a field</title><link>https://www.infopathdev.com:443/forums/thread/23169.aspx</link><pubDate>Wed, 19 Sep 2007 10:57:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23169</guid><dc:creator>grahamC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23169.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23169</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve got round this problem now. I think you need to reference a published template with a full http path. Also you need to put an extra &amp;quot;\&amp;quot; char in for every &amp;quot;\&amp;quot; that appears in the path. (due to c# escape characters). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;So my javascript all works. Now i just need to wrap that up in a button that can be placed on a sharepoint page as a user control and possibly then have that control wrapped up in a web part.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;That may be a little beyond the scope of this forum as i appreciate this is moving away from infopath functionality somewhat.... but if anyone has any ideas i&amp;#39;d be happy to hear them :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;cheers,&lt;/p&gt;
&lt;p&gt;graham&lt;/p&gt;</description></item><item><title>Re: open infopath 2003 form from sharepoint 2007 document list and pre-populate a field</title><link>https://www.infopathdev.com:443/forums/thread/23120.aspx</link><pubDate>Tue, 18 Sep 2007 11:05:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23120</guid><dc:creator>grahamC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23120.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23120</wfw:commentRss><description>&lt;p&gt;ok i&amp;#39;ve been trying to test this... i have created a little html page with some javascript as follows: &lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;html&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;xmlns&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;head&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;title&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt;Test bit of javascript page&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;title&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/p&gt;function&lt;/font&gt;&lt;font size="2"&gt; myfunction()&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; strHRef= window.location.href;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; subString = strHRef.substr(strHRef.indexOf(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Proposal&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;));&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; splitstring = subString.split(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; strReturn = splitstring[1];&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;font size="2"&gt;(strReturn);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;head&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;body&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/p&gt;function&lt;/font&gt;&lt;font size="2"&gt; openInfoPathPopulated()&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; ProjID = myfunction(); 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;alert(ProjID);&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;//&amp;lt;!--Start the application --&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; oApp = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; ActiveXObject(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;InfoPath.Application&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; oXDocument = oApp.XDocuments.NewFromSolution(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;c:\infopathtemplate\fifth.xsn&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;); &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; targetField1 = oXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//my:ID0&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;
&lt;p&gt;targetField1 = ProjID;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;form&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;input&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;button&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;onclick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;openInfoPathPopulated()&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;value&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Call function&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;form&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;p&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt;By pressing the button, a function will be called. The function will alert a message.&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;p&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;body&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;html&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;but i&amp;#39;m getting a problem with the path of the file to be opened: &amp;quot;the path referred to by an object model must be absolute&amp;quot;. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;i&amp;#39;m pretty new to all this.............. any ideas ??? Hopefully im on the right track with this.&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>open infopath 2003 form from sharepoint 2007 document list and pre-populate a field</title><link>https://www.infopathdev.com:443/forums/thread/23116.aspx</link><pubDate>Tue, 18 Sep 2007 08:51:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23116</guid><dc:creator>grahamC</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23116.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23116</wfw:commentRss><description>&lt;p&gt;hi, &lt;/p&gt;
&lt;p&gt;I have looked around the forum and found bits of posts that may be helpful to what i want to do but i just want to confirm that i am correct that this can be done ??&lt;/p&gt;
&lt;p&gt;I have a sharepoint site that produces a workflow for creating project proposals. The project proposal form is based on a published template in inofpath 2003.&lt;/p&gt;
&lt;p&gt;Basically when a user clicks generate proposal webpart button in sharepoint database entries are created in sqlserver db and an ID is assigned and a subsite for that proposal site is created. In that newly created subsite we put the infopath form based on the published infopath template in the mainsite&amp;nbsp;(we do not want to publish EVERY document that is created for all the subsites though....). What we really want is when the infopath doc is opened from the new project proposals subsite.. is to have the project ID displayed in the first field. The project ID can be taken from a part of the URL of the subsite by a bit of string manipulation.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have two questions really:&lt;/p&gt;
&lt;p&gt;1/ can this actually be done in infopath 2003 ?&lt;/p&gt;
&lt;p&gt;2/ if so, is the following how to all i need ?? &lt;a href="http://www.infopathdev.com/blogs/jim/archive/2005/09/14/Pass-Parameters-to-InfoPath.aspx"&gt;http://www.infopathdev.com/blogs/jim/archive/2005/09/14/Pass-Parameters-to-InfoPath.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think the how to will only work for a published document as you need to change the manifest etc...... We would ideally like all this fully automated for the user (as its a workflow) and not have to do any specific actions for each new document created in the subsites. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I hope i have been clear in my explanation !&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Appreciate any help/advice/pointers to samples that do this.&lt;/p&gt;</description></item></channel></rss>