<?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 write a formula with an Exponential in infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/50948.aspx</link><pubDate>Sat, 23 Jan 2010 21:53:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50948</guid><dc:creator>spegg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50948.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50948</wfw:commentRss><description>&lt;p&gt;Jimmy, Thanks for replying.&lt;/p&gt;
&lt;p&gt;I created a button and inserted the code below.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried to clean up my code, but I am a newbie and I am&amp;nbsp;debugging by adding and removing code.&amp;nbsp; Below is what I currently have&amp;nbsp;and I am currently getting the error &amp;quot;infopath&amp;nbsp;can not open current&amp;nbsp;form&amp;quot; when I try to preview it.&amp;nbsp; If I remove the&amp;nbsp;As&amp;nbsp;Single. The form will preview but then&amp;nbsp;I get&amp;nbsp;&amp;quot; type mismatch:&amp;nbsp;&amp;#39;Interest&amp;#39; File: script.vbs&amp;nbsp;line: 29. How do I declare my values as integer, currency and single.&amp;nbsp; What am I doing&amp;nbsp;wrong.&amp;nbsp; thanks.&lt;/p&gt;
&lt;p&gt;Sub CTRL64_5_OnClick(eventObj)&lt;br /&gt;Dim Payment&amp;nbsp; &lt;br /&gt;Dim Interest&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Dim Principle&amp;nbsp; &lt;br /&gt;Dim InTerm&amp;nbsp; &lt;br /&gt;Dim sgFctr&amp;nbsp; &lt;br /&gt;Dim sgInterest As Single&lt;br /&gt;&amp;#39; this is line 26&lt;br /&gt;Principle = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:PurchPrice&amp;quot;).text&amp;nbsp; &lt;br /&gt;Interest = XDocument.DOM.SelectSingleNode(&amp;quot;/my:myFields/my:EstRate&amp;quot;).text &lt;br /&gt;sgInterest = Interest / 12&lt;br /&gt;InTerm = XDocument.DOM.SelectSingleNode(&amp;quot;/my:myFields/my:AmortTerms&amp;quot;).text &lt;br /&gt;sgFctr = (1 + Interest) ^ (InTerm)&lt;br /&gt;Payment = Interest * sgFctr * Principle / (sgFctr-1)&lt;br /&gt;PandI.Text = Format(Payment, &amp;quot;Fixed&amp;quot;) &lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: how to write a formula with an Exponential in infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/50946.aspx</link><pubDate>Sat, 23 Jan 2010 16:35:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50946</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50946.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50946</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;It would help if you could tell us the actual error message and not something vague like this:&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;spegg:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;I tried to add it to mse and debug but got an error saying something about DOM and debug manager.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The problem might be that you&amp;#39;re using the wrong capitalization for DOM in these two lines:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;Percentage = XDocument.Dom.SelectSingleNode _&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;&lt;span style="font-size:11pt;font-family:Calibri;"&gt;Percentage = XDocument.Dom.SelectSingleNode _&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: how to write a formula with an Exponential in infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/50945.aspx</link><pubDate>Sat, 23 Jan 2010 16:17:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50945</guid><dc:creator>spegg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50945.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50945</wfw:commentRss><description>&lt;p&gt;Thank you for your response but I can not use C# in infopath 2003.&amp;nbsp; When I try to use C#, the tool wants to me to down load visual studio first.&amp;nbsp; This is a work laptop and I can not download software.&amp;nbsp; Therefore, the solution must be in 2003.&amp;nbsp; Again, thank you for your reply and the time you spent.&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;</description></item><item><title>Re: how to write a formula with an Exponential in infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/50877.aspx</link><pubDate>Thu, 21 Jan 2010 20:03:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50877</guid><dc:creator>jettpogi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50877.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50877</wfw:commentRss><description>&lt;p&gt;Hi Spegg,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not so familiar&amp;nbsp;VB and scripts so I recreated your scenario using InfoPath 2007 &amp;amp; C#. I did a quick sample form with the following code and it does work. Your formula looks good... I&amp;#39;m just not completely sure if the result I&amp;#39;m getting is correct&amp;nbsp;since I have no sample calculations to compare with.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the code:&lt;/p&gt;
&lt;p&gt;double Amount;&lt;br /&gt;double Percentage;&lt;br /&gt;double Payments;&lt;br /&gt;double Mortgage;&lt;/p&gt;
&lt;p&gt;XPathNavigator root = MainDataSource.CreateNavigator();&lt;br /&gt;Amount = double.Parse(root.SelectSingleNode(&amp;quot;/my:myFields/my:Amount&amp;quot;, NamespaceManager).Value);&lt;br /&gt;Percentage = double.Parse(root.SelectSingleNode(&amp;quot;/my:myFields/my:Percentage&amp;quot;, NamespaceManager).Value);&lt;br /&gt;Payments = double.Parse(root.SelectSingleNode(&amp;quot;/my:myFields/my:Payments&amp;quot;, NamespaceManager).Value);&lt;br /&gt;Mortgage = Amount * (Percentage * Math.Pow(1+Percentage, Payments))/(Math.Pow(1+Percentage,Payments-1));&lt;br /&gt;root.SelectSingleNode(&amp;quot;/my:myFields/my:Result&amp;quot;, NamespaceManager).SetValue(Mortgage.ToString());&lt;/p&gt;
&lt;p&gt;Hope you find this useful.&lt;/p&gt;
&lt;p&gt;Jett&lt;/p&gt;</description></item><item><title>how to write a formula with an Exponential in infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/50832.aspx</link><pubDate>Thu, 21 Jan 2010 04:02:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50832</guid><dc:creator>spegg</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50832.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50832</wfw:commentRss><description>&lt;p&gt;I did a search on &lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Exponential and did not find an valid answer.&amp;nbsp; is there any way to multiply a value by an &lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Exponential.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Or if I try to create a vb script&amp;nbsp;I need a step by step how to add the following function to my form&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;I tried to add it to mse and debug but got an error saying something about DOM and debug manager.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Thank you in advance.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Steve&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&amp;nbsp;Function MortgagePayment()&lt;br /&gt;Dim Payments&lt;br /&gt;Dim Percentage&lt;br /&gt;Dim Amount&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;Amount = XDocument.DOM.selectSingleNode _ &lt;br /&gt;(&amp;quot;/my:myFields/my:PurchPrice&amp;quot;).text &lt;br /&gt;Percentage = XDocument.Dom.SelectSingleNode _&lt;br /&gt;(&amp;quot;/my:myFields/my:EstRate&amp;quot;).text /12 &lt;br /&gt;Payments = XDocument.Dom.SelectSingleNode _&lt;br /&gt;(&amp;quot;/my:myFields/my:AmortTerms&amp;quot;).text &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;MortgagePayment = Amount * (Percentage * (1 + Percentage)^Payments)/((1 + Percentage)^Payments-1)&lt;br /&gt;End Function&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#333333;FONT-FAMILY:Calibri;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:Arial;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>