<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21225.aspx</link><pubDate>Mon, 25 Jun 2007 18:39:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21225</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21225.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21225</wfw:commentRss><description>&lt;p&gt;Now that you know your script works, the next thing to do is to look at how you&amp;#39;re invoking it. You&amp;#39;re doing it like this:&lt;/p&gt;&lt;p&gt;ProcId = Shell(&amp;quot;cscript \\franklin\c$\Inetpub\wwwroot\shared\Infopath\jscript.js 8275&amp;quot;)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can of course try to do it differently, maybe by doing Process.Start(), passing it the full path to cscript.exe and the rest of the command line as arguments.&lt;/p&gt;&lt;p&gt;However, I would still suspect you might be running into permission issues since you are doing this from an ASP.NET code which runs under lower priviledges. You might want to check the logs to see if any exceptions happened (not sure where to start looking, though, off the top of my head).&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21224.aspx</link><pubDate>Mon, 25 Jun 2007 17:53:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21224</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21224.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21224</wfw:commentRss><description>&lt;p&gt;Not so random, updated to SP1 - the script now runs from the run command.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Now I just need to get the script to run from my asp page.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for all your patience.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21223.aspx</link><pubDate>Mon, 25 Jun 2007 17:03:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21223</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21223.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21223</wfw:commentRss><description>&lt;p&gt;Here is a random thought: are you sure that your production machine has InfoPath 2003 SP1 or later?&lt;/p&gt;&lt;p&gt;I believe InfoPath 2003 RTM simply does not expose InfoPath.Application&lt;/p&gt;&lt;p&gt;If you&amp;#39;re running the RTM version of InfoPath then this is your problem&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21220.aspx</link><pubDate>Mon, 25 Jun 2007 16:56:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21220</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21220.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21220</wfw:commentRss><description>&lt;p&gt;It runs but fails on this line:&lt;br /&gt;var oApp = new ActiveXObject(&amp;quot;InfoPath.Application&amp;quot;);&lt;/p&gt;&lt;p&gt;With this error:&lt;br /&gt;Automation server can&amp;#39;t create object&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21217.aspx</link><pubDate>Mon, 25 Jun 2007 16:45:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21217</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21217.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21217</wfw:commentRss><description>&lt;p&gt;Strange... maybe some .NET permissions problems that prevent you from executing scripts on the production machine? It&amp;#39;s a wild guess, really. Normally you should get an exception if it doesn&amp;#39;t like you.&lt;/p&gt;&lt;p&gt;Since you are doing a shell exec, try to do a start | run on your production machine and paste the&amp;nbsp;command there - see what happens.&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21215.aspx</link><pubDate>Mon, 25 Jun 2007 16:34:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21215</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21215.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21215</wfw:commentRss><description>&lt;p&gt;That helps.&lt;/p&gt;&lt;p&gt;It&amp;#39;s not even running the script file on the production box.&lt;/p&gt;&lt;p&gt;I change the start of the jscript.js to this:&lt;/p&gt;&lt;p&gt;WScript.Echo(&amp;quot;Start&amp;quot;);&lt;br /&gt;if(WScript.Arguments.count()==1)&lt;br /&gt;{&lt;br /&gt;var param1 = WScript.Arguments.Item(0);&lt;br /&gt;}&lt;br /&gt;...&lt;/p&gt;&lt;p&gt;and I never get the start message box (I do on my local machine).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;If I put this string (\\franklin\c$\Inetpub\wwwroot\Shared\Infopath) into my Windows Explorer address bar on the web server it takes me to right folder.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21212.aspx</link><pubDate>Mon, 25 Jun 2007 16:22:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21212</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21212.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21212</wfw:commentRss><description>&lt;p&gt;Well, it&amp;#39;s pretty hard to debug pasted code especially when it is known to work on one environment but not the other, but maybe a couple of pointers:&lt;/p&gt;&lt;p&gt;- Make sure the InfoPath process get started when you execute the script&lt;/p&gt;&lt;p&gt;- Try and see if you can replace &lt;strong&gt;cscript&lt;/strong&gt; with &lt;strong&gt;wscript&lt;/strong&gt;. Then add WScript.Echo() lines throughout your javascript code. When executed with wscript, those should appear as mesageboxes. Now you can put those traces at different points of your code to see what is failing&lt;/p&gt;&lt;p&gt;Sorry that I don&amp;#39;t have more suggestions for now...&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21209.aspx</link><pubDate>Mon, 25 Jun 2007 16:13:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21209</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21209.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21209</wfw:commentRss><description>&lt;p&gt;Oops, that was a error when I copy/pasted, the code I&amp;#39;m testing isn&amp;#39;t commented out.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I fixed the code above.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21208.aspx</link><pubDate>Mon, 25 Jun 2007 16:08:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21208</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21208.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21208</wfw:commentRss><description>Didn&amp;#39;t you comment out the line that starts the script in your code? :)</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21202.aspx</link><pubDate>Mon, 25 Jun 2007 14:33:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21202</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21202.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21202</wfw:commentRss><description>&lt;p&gt;OK,&lt;/p&gt;&lt;p&gt;I got it to work on my dev box using the following code but when I run it from our production server nothing happens.&amp;nbsp; I don&amp;#39;t really work with jscript so I&amp;#39;m not even sure where to begin debugging.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the relevant code&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ProcId As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Proc As System.Diagnostics.Process&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcId = Shell(&amp;quot;cscript \\franklin\c$\Inetpub\wwwroot\shared\Infopath\jscript.js 8275&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Proc = System.Diagnostics.Process.GetProcessById(ProcId)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Proc.WaitForExit(3000)&lt;br /&gt;&amp;nbsp; End Sub&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And this is the js file called from above&lt;/p&gt;&lt;p&gt;if(WScript.Arguments.count()==1)&lt;br /&gt;{&lt;br /&gt;var param1 = WScript.Arguments.Item(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Start the application&lt;br /&gt;var oApp = new ActiveXObject(&amp;quot;InfoPath.Application&amp;quot;);&lt;br /&gt;WScript.Echo(&amp;quot;InfoPath Version: &amp;quot; + oApp.Version);&lt;br /&gt;&lt;br /&gt;//Open an InfoPath document from the published template&lt;br /&gt;var oXDocumentCollection = oApp.XDocuments;&lt;br /&gt;var oXDocument = oXDocumentCollection.NewFromSolution(&amp;quot;http://franklin/shared/infopath/Metro Sales MA.xsn&amp;quot;);&lt;br /&gt;&lt;br /&gt;// Get pointers to the target fields&lt;br /&gt;var oID = oXDocument.DOM.selectSingleNode(&amp;quot;//my:PlanId&amp;quot;);&lt;br /&gt;&lt;br /&gt;//Determine whether the xsi:nil attribute is set for this&lt;br /&gt;//element. If so, remove the xsi:nil attributes so that&lt;br /&gt;//the value can be set.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (oID.getAttribute(&amp;quot;xsi:nil&amp;quot;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oID.removeAttribute(&amp;quot;xsi:nil&amp;quot;);&lt;br /&gt;&lt;br /&gt;//Update the fields&lt;br /&gt;oID.text = param1;&lt;br /&gt;&lt;br /&gt;//Submit the Form&lt;br /&gt;//oXDocument.Submit();&lt;br /&gt;&lt;br /&gt;oXDocument.QueryAdapter.Command = &amp;#39;SELECT * FROM vwMaPlanForReport WHERE PlanId = &amp;#39; + param1;&lt;br /&gt;&lt;br /&gt;//execute &amp;quot;dbo&amp;quot;.&amp;quot;byroyalty&amp;quot; &amp;#39; + percentageValue;&amp;nbsp; &lt;br /&gt;//Query the Data Source. &lt;br /&gt;oXDocument.Query();&lt;br /&gt;&lt;br /&gt;oXDocument.DataObjects[&amp;quot;Detail&amp;quot;].QueryAdapter.Command = &amp;#39;execute &amp;quot;dbo&amp;quot;.&amp;quot;ps_Reports_MA_Detail_Summary&amp;quot; &amp;#39; + param1;&lt;br /&gt;//&amp;#39;SELECT * FROM vwMaPlanEquipmentDetail WHERE PlanId = &amp;#39; &lt;br /&gt;oXDocument.DataObjects[&amp;quot;Detail&amp;quot;].QueryAdapter.Query();&lt;br /&gt;&lt;br /&gt;//Close up shop&lt;br /&gt;oXDocumentCollection = null;&lt;br /&gt;//oApp.Quit();&lt;br /&gt;oApp = null;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21154.aspx</link><pubDate>Fri, 22 Jun 2007 13:17:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21154</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21154.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21154</wfw:commentRss><description>&lt;p&gt;That&amp;#39;s what I was thinking but later in the blog article it talks about using the parameters in the IP2003 so I was holding out hope.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ll look into the two links,&lt;/p&gt;&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21153.aspx</link><pubDate>Fri, 22 Jun 2007 13:13:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21153</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21153.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21153</wfw:commentRss><description>&lt;p&gt;The last line of your post is unfortunately your problem. Command line arguments are only supported in InfoPath 2003.&lt;/p&gt;&lt;p&gt;See this forum post for some IP2003 workarounds:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/post/20383.aspx"&gt;http://www.infopathdev.com/forums/post/20383.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Passing Data into a Form</title><link>https://www.infopathdev.com:443/forums/thread/21151.aspx</link><pubDate>Fri, 22 Jun 2007 13:05:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21151</guid><dc:creator>TogasPoon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21151.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=21151</wfw:commentRss><description>&lt;p&gt;From this Blog:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx" title="http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx"&gt;http://blogs.msdn.com/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I should be able to run a command line like this:&lt;/p&gt;&lt;p&gt;&lt;em&gt;infopath.exe &amp;ldquo;C:\foo\bar.xml&amp;rdquo; &lt;strong&gt;/InputParameters &amp;quot;baz=1&amp;amp;biz=2&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&amp;quot;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;to pass in parameters to my form.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When I do I get the following error:&lt;/p&gt;&lt;p&gt;Microsoft Office InfoPath does not recognize some or all of the command line options. Exit and restart MS InfoParth with the correct command line options.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m using Infopath 2003 SP2&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>