<?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: VBscript code to point to a field</title><link>https://www.infopathdev.com:443/forums/thread/51642.aspx</link><pubDate>Wed, 10 Feb 2010 17:05:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51642</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51642.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51642</wfw:commentRss><description>&lt;p&gt;Sorry, my mistake... I haven&amp;#39;t done script in InfoPath for a long time. The initial object is &amp;quot;XDocument&amp;quot; (used in Script) not &amp;quot;thisXDocument&amp;quot; (which is used in VB.NET and C#)&lt;/p&gt;</description></item><item><title>Re: VBscript code to point to a field</title><link>https://www.infopathdev.com:443/forums/thread/51568.aspx</link><pubDate>Tue, 09 Feb 2010 19:07:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51568</guid><dc:creator>reggieoverton</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51568.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51568</wfw:commentRss><description>&lt;p&gt;Thanks Greg... I can write code in VB and VBA. When writing code in those app. once you type in a valid name and press period there will be a drop down box. I dont see a box coming up nor does the appliacation auto fix var names to keep the names the same all through code. Is this normal or is there some going on with my script?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Also I am getting this error when testing the code.&lt;/p&gt;
&lt;p&gt;Object required: &amp;#39;thisXDocument&amp;#39;&lt;/p&gt;
&lt;p&gt;nodeVariable = thisXDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:test&amp;quot;) &lt;/p&gt;
&lt;p&gt;msgbox nodeVariable&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help!!&lt;/p&gt;</description></item><item><title>Re: VBscript code to point to a field</title><link>https://www.infopathdev.com:443/forums/thread/51558.aspx</link><pubDate>Tue, 09 Feb 2010 17:04:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51558</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51558.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51558</wfw:commentRss><description>&lt;p&gt;If the calculation is not complicated you should consider using Rules to accomplish this task.&lt;/p&gt;
&lt;p&gt;Otherwise, there should be plenty of InfoPath VBScript examples online, but the basics of the selection are:&lt;/p&gt;
&lt;p&gt;nodeVariable = thisXDocument.DOM.selectSingleNode(___XPATH_HERE___)&lt;/p&gt;
&lt;p&gt;The XPATH must be fully qualified, meaning it has to have all the right namespace prefixes, something like:&lt;/p&gt;
&lt;p&gt;/dfs:myFields/dfs:dataFields/d:table/@column&lt;/p&gt;</description></item><item><title>VBscript code to point to a field</title><link>https://www.infopathdev.com:443/forums/thread/51375.aspx</link><pubDate>Wed, 03 Feb 2010 21:28:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51375</guid><dc:creator>reggieoverton</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51375</wfw:commentRss><description>&lt;p&gt;I need to know how to point to a field using vbscript. The fields are from a SQL server if that makes any differents. The SQL server database is connected to the form and I want to do some math to add up fields and divide and spit out the results in a textbox. Thanks...&lt;/p&gt;</description></item></channel></rss>