<?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: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/62210.aspx</link><pubDate>Sat, 11 Dec 2010 20:53:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:62210</guid><dc:creator>jappiej</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/62210.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=62210</wfw:commentRss><description>&lt;p&gt;thanks all for the help, but at the end it wasn&amp;#39;t necessary.&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61949.aspx</link><pubDate>Sun, 05 Dec 2010 04:05:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61949</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61949.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61949</wfw:commentRss><description>&lt;p&gt;Great to have your posts on this forum Potemkine. You always open my eyes a little and I am very thankful.&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61937.aspx</link><pubDate>Fri, 03 Dec 2010 19:25:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61937</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61937.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61937</wfw:commentRss><description>&lt;p&gt;Hi Hilary yes it should run on domain trust and&amp;nbsp;I&amp;nbsp;should have said that&amp;nbsp;I just had the reflex to set to &amp;quot;Full trust&amp;quot; when I use code.&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61933.aspx</link><pubDate>Fri, 03 Dec 2010 17:06:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61933</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61933.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61933</wfw:commentRss><description>&lt;p&gt;Looking at the code sample provided, I see nothing that would require full trust. This code should run under domain trust. Of course, if this is for a browser form, the form has to be admin deployed....&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61930.aspx</link><pubDate>Fri, 03 Dec 2010 14:56:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61930</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61930.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61930</wfw:commentRss><description>&lt;p&gt;Hi,&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;jappiej:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;BTW, when i open youre template it also asked for the Template1.csproj &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Yes, it&amp;#39;s normal I just put the template to show you my xml structure. &lt;/p&gt;
&lt;p&gt;Patrick it&amp;#39;s certain that the it&amp;#39;s better to have&amp;nbsp;the lowest security level on a form and Qrules can certainly help you to go on that way. But the possibility to add code on a form is also a&amp;nbsp;really good feature I just help him on this way.&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61918.aspx</link><pubDate>Fri, 03 Dec 2010 08:11:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61918</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61918.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61918</wfw:commentRss><description>&lt;p&gt;Security level = Full Trust!? Please don&amp;#39;t do that! That is not a best practice. 95% of all forms do not need to be Full Trust and it complicates and adds cost to your deployment (because you have to sign the form or use an MSI to install it).&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t need full trust to solve this problem in code. Not sure why Potemkine is asking you to do that. &lt;/p&gt;
&lt;p&gt;But seriously, why waste time on code that you&amp;#39;ll have to maintain in all of your templates. Just use qRules free trial and it will take you 15-20 minutes. It&amp;#39;s really simple - that&amp;#39;s why we created it - to help answer the most common needs of users in the forum. It also helps us pay for the forum and it&amp;#39;s really cheap - did I say free trial? &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61917.aspx</link><pubDate>Fri, 03 Dec 2010 07:07:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61917</guid><dc:creator>jappiej</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61917.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61917</wfw:commentRss><description>&lt;p&gt;Thanks, i&amp;#39;m gonna try it and will let you know if it works for me :)&lt;/p&gt;
&lt;p&gt;BTW, when i open youre template it also asked for the Template1.csproj :)&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61909.aspx</link><pubDate>Thu, 02 Dec 2010 21:22:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61909</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61909.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61909</wfw:commentRss><description>&lt;p&gt;Ok here we go. First of all you have to set you security level, so go on tools, form options, security and trust, and select &amp;quot;full trust&amp;quot;, you have to select one certifcate to sign your code, if you don&amp;#39;t have one office can create one for you. After that on programming select C#.&lt;/p&gt;
&lt;p&gt;Click Ok to close this window. After that you have to set an event handler on your field1 to create your rows right click on the field, programming and select change event, it will open a programming interface.&lt;/p&gt;
&lt;p&gt;here you have to put some code:&lt;/p&gt;
&lt;p&gt;XPathNavigator Root= this.MainDataSource.CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //delete all rows of repeating table&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Root.SelectSingleNode(&amp;quot;/my:myFields/my:RepeatingTable/my:MyTable&amp;quot;,this.NamespaceManager).DeleteRange(Root.SelectSingleNode(&amp;quot;/my:myFields/my:RepeatingTable/my:MyTable[last()]&amp;quot;,this.NamespaceManager));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch { }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int NumOfRow=0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //take the num of rows to create&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int.TryParse(e.Site.Value, out NumOfRow);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 1; i &amp;lt;= NumOfRow; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator Clonenode = Root.SelectSingleNode(&amp;quot;/my:myFields/my:ReferenceGroup/my:RepeatingTable/my:MyTable&amp;quot;, this.NamespaceManager).Clone();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add your code to divide here&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Root.SelectSingleNode(&amp;quot;/my:myFields/my:RepeatingTable&amp;quot;, this.NamespaceManager).AppendChild(Clonenode);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;You have to use your own xpath. I attach my own test form if it can help.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61903.aspx</link><pubDate>Thu, 02 Dec 2010 18:47:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61903</guid><dc:creator>jappiej</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61903.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61903</wfw:commentRss><description>&lt;p&gt;thanks, thought already it would be some sort of code....but don&amp;#39;t know exactly where to start.&lt;/p&gt;
&lt;p&gt;if you want to help me i would appreciate it&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;@Jimmy, thnx for the reply, would try it first with some code&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61888.aspx</link><pubDate>Thu, 02 Dec 2010 15:10:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61888</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61888.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61888</wfw:commentRss><description>&lt;p&gt;You can also use qRules to do this.&amp;nbsp; Just use the &lt;strong&gt;Insert&lt;/strong&gt; command to insert 5 rows, and then use an ordinary rule or default value&amp;nbsp;to set your field to the value of the formula &lt;strong&gt;field2 div field1&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Re: Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61885.aspx</link><pubDate>Thu, 02 Dec 2010 14:52:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61885</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61885.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61885</wfw:commentRss><description>&lt;p&gt;Hi jappiej and welcome to this forum.&lt;/p&gt;
&lt;p&gt;I think you have to use some code to do that. You can use a repeating table and create rows programatically. If you want&amp;nbsp; I can give you some help for that.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Calculating Fields based on a value</title><link>https://www.infopathdev.com:443/forums/thread/61883.aspx</link><pubDate>Thu, 02 Dec 2010 13:20:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61883</guid><dc:creator>jappiej</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61883.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=61883</wfw:commentRss><description>&lt;p&gt;Hello&amp;nbsp;Users,&lt;/p&gt;
&lt;p&gt;I got a simple question, but couldn&amp;#39;t find the answer here, or my search query wasn&amp;#39;t good.&lt;br /&gt;I&amp;#39;m using Infopath 2007.&lt;/p&gt;
&lt;p&gt;I have a field (field1), when i fill in this field a number for example 5 i want to show a table with 5 fields.&lt;br /&gt;An other existing field (field2)&amp;nbsp;is a calculating a sum of other fields.&lt;br /&gt;The 5 fields that in the table are created must do also calculate the field2 / field1&lt;/p&gt;
&lt;p&gt;for the picture:&lt;br /&gt;field1 value = &amp;nbsp;5&lt;br /&gt;field2&amp;nbsp;value =&amp;nbsp;&amp;nbsp;100&amp;nbsp;&lt;br /&gt;the 5 fields that are created have the value of 20 in each field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is that possible ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;</description></item></channel></rss>