<?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: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4385.aspx</link><pubDate>Tue, 10 Apr 2007 09:12:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4385</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4385.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4385</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;Regarding to the A)2. problem: I tried to use the number() and val() functions, but just errors.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Nagy Ferenc</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4384.aspx</link><pubDate>Tue, 10 Apr 2007 07:20:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4384</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4384.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4384</wfw:commentRss><description>I resolved this in the source below.&lt;br /&gt;Just the 3 column headers are not: VALUE1 | VALUE2 | SUM,&lt;br /&gt;they are: FELUL | NRDOC | BUCIN&lt;br /&gt;&lt;br /&gt;'-------------------------------------&lt;br /&gt;Sub CTRL43_5_OnClick(eventObj)&lt;br /&gt;' Write your code here&lt;br /&gt;&lt;br /&gt;	nodeCount = 0&lt;br /&gt;	set nodeList = XDocument.DOM.getElementsByTagName("my:felul")&lt;br /&gt;		for each node in nodeList&lt;br /&gt;			nodeCount = nodeCount + 1&lt;br /&gt;		next&lt;br /&gt;	msgbox nodeCount&lt;br /&gt;	&lt;br /&gt;	i = 0&lt;br /&gt;	set nodeList = XDocument.DOM.getElementsByTagName("my:bucin")&lt;br /&gt;		for each node in nodeList&lt;br /&gt;			if (nodeCount - 1) = i then exit for&lt;br /&gt;			felul2 = XDocument.DOM.getElementsByTagName("my:felul").Item(i+1).text&lt;br /&gt;			nrdoc2 = XDocument.DOM.getElementsByTagName("my:nrdoc").Item(i+1).text&lt;br /&gt;			bucin1 = felul2 + nrdoc2&lt;br /&gt;			XDocument.DOM.getElementsByTagName("my:bucin").Item(i).text = bucin1&lt;br /&gt;			&lt;br /&gt;			i = i + 1&lt;br /&gt;		next&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;'-------------------------------&lt;br /&gt;&lt;br /&gt;Questions:&lt;br /&gt;A) Please tell me a function to:&lt;br /&gt;1. replace my source for nodeCount (to count the nr. of nodes)&lt;br /&gt;2. for the "bucin1 = felul2 + nrdoc2" line, where the source has to add 2 numbers. My results is always a string.&lt;br /&gt;Ex.: if in my first 2 columns are 2 numbers: "1" and "1" in the 3rd column (above line) has to be "2" (1+1) and I have always "11" as a string adding. In simply words: to convert string to double.&lt;br /&gt;B) Using this source in a Repeating Section this source want to resolve my problem in all sections continoulsy. What can I do to transform my source, to made the calculations just for the Section where I press the button. The button is also in the Repeating Section.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Nagy Ferenc</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4383.aspx</link><pubDate>Thu, 05 Apr 2007 08:20:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4383</guid><dc:creator>B.Shiva Prasad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4383.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4383</wfw:commentRss><description>Hi elektrocad,&lt;br /&gt;&lt;br /&gt;I think it is not possible by taking 'position() + 1' in repeated table, you have to write the code by taking the DOM and have do manipulate with your logic. Because InfoPath wont take the value of an individual field in one row to manipulate in another row.&lt;br /&gt;&lt;br /&gt;I will try it in VB Script, you also try to do with the above logic.</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4382.aspx</link><pubDate>Thu, 05 Apr 2007 07:39:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4382</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4382.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4382</wfw:commentRss><description>Thanks.&lt;br /&gt;&lt;br /&gt;I'm using VB.&lt;br /&gt;If you could translate in VB script it would be greate.&lt;br /&gt;Firts time I was thinking to resolve this problem with a simple formula inserting in the Value.&lt;br /&gt;&lt;br /&gt;Ex.: in the SUM column I inserted a Value:&lt;br /&gt;VALUE1[position() + 1] + VALUE2[position() + 1]&lt;br /&gt;or&lt;br /&gt;VALUE1[current() + 1] + VALUE2[current() + 1]&lt;br /&gt;&lt;br /&gt;But it's not working.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Nagy Ferenc</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4381.aspx</link><pubDate>Thu, 05 Apr 2007 07:26:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4381</guid><dc:creator>B.Shiva Prasad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4381.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4381</wfw:commentRss><description>Hi elektrocad,&lt;br /&gt;&lt;br /&gt;small mistake with the about code if you click the button at the first time by inserting a single row will show the error.&lt;br /&gt;&lt;br /&gt;cut this code &lt;br /&gt;&lt;br /&gt;if(index == xl2.length)&lt;br /&gt;{&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;and paste before the &lt;br /&gt;&lt;br /&gt;((System.Object)(((Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper)(x)).nodeTypedValue)) = Convert.ToInt16(field1[index]) + Convert.ToInt16(field2[index]);&lt;br /&gt;&lt;br /&gt;means interchange the statements.&lt;br /&gt;&lt;br /&gt;you will work for the first time also.</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4380.aspx</link><pubDate>Thu, 05 Apr 2007 07:21:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4380</guid><dc:creator>B.Shiva Prasad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4380.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4380</wfw:commentRss><description>Hi elektrocad,&lt;br /&gt;&lt;br /&gt;try this code its working, If possible try to decrese the code. I am writing this code in button click event.&lt;br /&gt;&lt;br /&gt;public void CTRL5_5_OnClick(DocActionEvent e)&lt;br /&gt;		{&lt;br /&gt;			// Write your code here.&lt;br /&gt;			IXMLDOMNode node = thisXDocument.DOM.selectSingleNode("my:myFields/my:group1");&lt;br /&gt;			DOMNodeList xl = thisXDocument.DOM.getElementsByTagName("my:field1");&lt;br /&gt;			DOMNodeList xl1 = thisXDocument.DOM.getElementsByTagName("my:field2");&lt;br /&gt;			DOMNodeList xl2 = thisXDocument.DOM.getElementsByTagName("my:field3");&lt;br /&gt;&lt;br /&gt;			ArrayList field1 = new ArrayList();&lt;br /&gt;			ArrayList field2 = new ArrayList();&lt;br /&gt;			ArrayList field3 = new ArrayList();&lt;br /&gt;			foreach(DOMNode x in xl)&lt;br /&gt;			{&lt;br /&gt;				string s = ((System.Object)(((Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper)(x)).nodeTypedValue)).ToString();&lt;br /&gt;				field1.Add(s);&lt;br /&gt;			}&lt;br /&gt;			foreach(DOMNode x in xl1)&lt;br /&gt;			{&lt;br /&gt;				string s = ((System.Object)(((Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper)(x)).nodeTypedValue)).ToString();&lt;br /&gt;				field2.Add(s);&lt;br /&gt;			}&lt;br /&gt;			int index = 1;&lt;br /&gt;			foreach(DOMNode x in xl2)&lt;br /&gt;			{&lt;br /&gt;				((System.Object)(((Microsoft.Office.Interop.InfoPath.SemiTrust.DOMNodeWrapper)(x)).nodeTypedValue)) = Convert.ToInt16(field1[index]) + Convert.ToInt16(field2[index]);&lt;br /&gt;				index++;&lt;br /&gt;				if(index == xl2.length)&lt;br /&gt;				{&lt;br /&gt;					break;&lt;br /&gt;				}&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;try to make your logic simpler.&lt;br /&gt;&lt;br /&gt;Hope this will help you.</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4379.aspx</link><pubDate>Thu, 05 Apr 2007 05:34:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4379</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4379.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4379</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;OK. The spaces were cuted from the table.&lt;br /&gt;Here is my example with column separators (|):&lt;br /&gt;&lt;br /&gt;1row: VALUE1 | VALUE2 | SUM (&amp;lt;- the header of the table)&lt;br /&gt;2row: 0 | 0 | 5 (from the 3row: 2+3)&lt;br /&gt;3row: 2 | 3 | 6 (from the 4row: 5+1)&lt;br /&gt;4row: 5 | 1 | 0&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Nagy Ferenc</description></item><item><title>Re: Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/4378.aspx</link><pubDate>Wed, 04 Apr 2007 13:40:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4378</guid><dc:creator>B.Shiva Prasad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=4378</wfw:commentRss><description>Hi elektrocad, &lt;br /&gt;&lt;br /&gt;Its intresting, but your example seems some what confusing, in the 2row there is only one value '5' and in the 3row there are 3 values 2,3,6.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;some understanding point is, in the 2row you are taking the 3row (2,3) value and like that in 3row, 4row (5,1). &lt;br /&gt;But in between why 6 came, and in 1row what is VALUE1, VALUE2, SUM is it variables?&lt;br /&gt;&lt;br /&gt;can you give another example with extending 2 more rows.</description></item><item><title>Adding values from different rows</title><link>https://www.infopathdev.com:443/forums/thread/1951.aspx</link><pubDate>Wed, 04 Apr 2007 13:04:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1951</guid><dc:creator>elektrocad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1951.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1951</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I want to made a function in a Repeating Table which will ADD a value from the next row's VALUE1 value with next row's VALUE2 value.&lt;br /&gt;And the function to be a value in the line "before" the next row.&lt;br /&gt;How can be possibile to do this?&lt;br /&gt;&lt;br /&gt;Ex.:&lt;br /&gt;1row:  VALUE1  VALUE2  SUM &lt;br /&gt;2row:                  5 (2+3)&lt;br /&gt;3row:  2       3       6 (5+1)&lt;br /&gt;4row:  5       1  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Nagy Ferenc</description></item></channel></rss>