<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63826.aspx</link><pubDate>Wed, 02 Feb 2011 19:49:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63826</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63826.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63826</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Can you use an index or a relative path when you call an email webservice?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I seem to always be feed the email with the first instance of the group. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63344.aspx</link><pubDate>Wed, 19 Jan 2011 16:11:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63344</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63344.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63344</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Worked again...THANK YOU so much&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63343.aspx</link><pubDate>Wed, 19 Jan 2011 15:32:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63343</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63343.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63343</wfw:commentRss><description>&lt;p&gt;Try removing the &lt;strong&gt;../&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63342.aspx</link><pubDate>Wed, 19 Jan 2011 15:14:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63342</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63342</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Trying to use relative paths --- following some instructions I found on this site.&amp;nbsp;&amp;nbsp; This is my code:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;XDocument.DataObjects(&amp;quot;vw_Fedex_SPOD_N&amp;quot;).DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; &amp;#39;);	
	&lt;/p&gt;&lt;p&gt;&lt;b&gt;trackingnum = eventObj.Source.selectSingleNode(&amp;quot;../@TransmartTrackingNumber&amp;quot;).text;&lt;/b&gt; &lt;/p&gt;&lt;p&gt;With this syntax, I get the error that there is no object. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;THANK YOU THANK YOU&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63322.aspx</link><pubDate>Wed, 19 Jan 2011 04:32:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63322</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63322.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63322</wfw:commentRss><description>&lt;p&gt;The reason Source isn&amp;#39;t doing what you expect is that you&amp;#39;re using absolute XPaths.&amp;nbsp; You need to use relative XPaths.&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63319.aspx</link><pubDate>Wed, 19 Jan 2011 03:23:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63319</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63319</wfw:commentRss><description>&lt;p&gt;The reason I needed to find the current member of the group is because when I used this statement in the button code, it always pulled the first instance of d:vw_Fedex_SPOD_N&lt;/p&gt;&lt;p&gt;trackingnum = eventObj.Source.selectsingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:vw_Fedex_SPOD_N/@TrackingNumber&amp;quot;).text; &lt;/p&gt;&lt;p&gt;(Not sure why that didn&amp;#39;t get the current instance. Everything I read said it would....)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now (thanks to you), I have a number on the form that evaluates correctly to the current instance index. The index variable is instance_nbr, and it does evaluate correctly to the current instance of d:vw_Fedex_SPOD_N in the button code. &lt;/p&gt;&lt;p&gt;var nodesDetail = XDocument.DOM.selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/d:vw_Fedex_SPOD_N&amp;quot;);
&lt;/p&gt;&lt;p&gt;	var row = nodesDetail.item(instance_nbr); &lt;br /&gt;&lt;/p&gt;&lt;p&gt;trackingnum = row.selectSingleNode(&amp;quot;@TrackingNumber&amp;quot;).text &lt;/p&gt;&lt;p&gt;But the last statement throws an error - null is null or not an object.&lt;/p&gt;&lt;p&gt;&amp;nbsp;How can I use this index to load&amp;nbsp; the correct instance values into fields?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;THANK YOU&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63314.aspx</link><pubDate>Tue, 18 Jan 2011 18:46:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63314</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63314.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63314</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;THANK YOU! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63313.aspx</link><pubDate>Tue, 18 Jan 2011 18:45:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63313</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63313.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63313</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;It worked ---- !!!!!!!&amp;nbsp;&amp;nbsp; Thank you thank you.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63312.aspx</link><pubDate>Tue, 18 Jan 2011 18:28:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63312</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63312.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63312</wfw:commentRss><description>&lt;p&gt;Your button rule is setting the field to the string value &amp;quot;count(preceding-sibling::vw_Fedex_SPOD_N)&amp;quot;.&amp;nbsp; You need to use the formula editor dialog.&amp;nbsp; I was mistaken in the formula I gave.&amp;nbsp; It should be:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;count(preceding-sibling::&lt;strong&gt;d:&lt;/strong&gt;vw_Fedex_SPOD_N) &lt;strong&gt;+ 1&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The reason the field is always showing 1 is that you have a rule on the field that sets itself to the value of &lt;strong&gt;count(.) &lt;/strong&gt;(which is always 1) when its value is modified.&amp;nbsp; You need to disable that rule.&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63310.aspx</link><pubDate>Tue, 18 Jan 2011 18:15:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63310</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63310.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63310</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Here it comes --- the DUMMY button is the one with the new rule, setting the ID field to count(preceding-sibling::vw_Fedex_SPOD_N)&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63309.aspx</link><pubDate>Tue, 18 Jan 2011 17:38:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63309</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63309</wfw:commentRss><description>&lt;p&gt;Could you post your form here again with those modifications?&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63305.aspx</link><pubDate>Tue, 18 Jan 2011 16:50:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63305</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63305.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63305</wfw:commentRss><description>&lt;p&gt;Many thanks for your help --- &lt;/p&gt;
&lt;p&gt;I created a button inside my repeating section, added one rule - to set a fields value to count(preceding-sibling::vw_Fedex_SPOD_N) &lt;/p&gt;
&lt;p&gt;Then, I previewed the form. There were three instances of the repeating section. &lt;/p&gt;
&lt;p&gt;I clicked&amp;nbsp;the button in instance 1 - field value set to 1. &lt;/p&gt;
&lt;p&gt;I clicked the button in instance 2 - field value set to 1. &lt;/p&gt;
&lt;p&gt;I clicked the button in instance&amp;nbsp;3 - field value set to 1. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;What am I doing wrong?&amp;nbsp;&amp;nbsp; How do I get the current instance number?&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63274.aspx</link><pubDate>Mon, 17 Jan 2011 13:57:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63274</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63274.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63274</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thank you, will try....&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63272.aspx</link><pubDate>Mon, 17 Jan 2011 13:44:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63272</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63272.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63272</wfw:commentRss><description>&lt;p&gt;position() and current() just don&amp;#39;t work like that.&lt;/p&gt;
&lt;p&gt;You should be able to use this formula in your button&amp;#39;s rule to determine the row number where that button was clicked.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;count(preceding-sibling::vw_Fedex_SPOD_N)&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Current and Position ---- always one (1) ?</title><link>https://www.infopathdev.com:443/forums/thread/63271.aspx</link><pubDate>Mon, 17 Jan 2011 13:44:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63271</guid><dc:creator>leoffneym</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63271.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=63271</wfw:commentRss><description>&lt;p&gt;By &amp;quot;Current&amp;quot; do you actually mean where the cursor is, or the last row of the repeating table.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you mean the last row of the repeating table, you have to use the &amp;#39;last()&amp;#39; command in the x-path.&lt;/p&gt;
&lt;p&gt;Ex: /my:myFields/my:NameOfGroup/my:NameOfRepeatingTable[last()]/my:NameOfField&lt;/p&gt;
&lt;table class=""&gt;

&lt;tr&gt;
&lt;td class=""&gt;Name&lt;/td&gt;
&lt;td class=""&gt;Number&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;Item 1&lt;/td&gt;
&lt;td class=""&gt;1&lt;/td&gt;
&lt;tr&gt;
&lt;td class=""&gt;Item 2&lt;/td&gt;
&lt;td class=""&gt;2&lt;/td&gt;
&lt;tr&gt;
&lt;td class=""&gt;Item 3&lt;/td&gt;
&lt;td class=""&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;To get the last of Number from this table, it would be: /my:myFields/my:Group1/my:ItemTable[last()]/my:Number&lt;/p&gt;
&lt;p&gt;The my namespace, myFields and Group1 can be different depending on you setup your fields.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are trying to get the true current(where the cursor is) value, I don&amp;#39;t think it possible.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;GMoore&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>