<?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: Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18755.aspx</link><pubDate>Fri, 11 Feb 2005 20:34:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18755</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18755.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18755</wfw:commentRss><description>Thanx much!&lt;br /&gt;Glad you got it working!&lt;br /&gt;Glad to be able to help out.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18754.aspx</link><pubDate>Fri, 11 Feb 2005 16:19:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18754</guid><dc:creator>franklb99</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18754.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18754</wfw:commentRss><description>Thanks!  I actually got it to work yesterday by using something like &lt;br /&gt;{&lt;br /&gt;var oEnterName = XDocument.DOM.selectSingleNode("//my:grp1/my:EnterName");&lt;br /&gt;var oNodes = XDocument.DOM.selectNodes("//my:Acq_grp/my:Acq_nxt_grp/my:acq_nxt_usr");&lt;br /&gt;var oNode;&lt;br /&gt;while(oNode = oNodes.nextNode())&lt;br /&gt;{&lt;br /&gt;	if (oNode.text == "-")&lt;br /&gt;	oNode.text = oEnterName.text;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Thanks for your help!!&lt;br /&gt;I like your site especially since there didn't used to be many InfoPath online resources!&lt;br /&gt;Brian</description></item><item><title>Re: Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18753.aspx</link><pubDate>Thu, 10 Feb 2005 20:31:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18753</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18753.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18753</wfw:commentRss><description>You just need to specify a filter in the XPath you are selecting... as follows:&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;    var oEnterName = XDocument.DOM.selectSingleNode("//my:EnterName");&lt;br /&gt;    var oNodes = XDocument.DOM.selectNodes("//my:group/my:small_grp/my:grp_field[. = 'update' or . = '']");&lt;br /&gt;    var oNode;&lt;br /&gt;    while(oNode = oNodes.nextNode())&lt;br /&gt;    {&lt;br /&gt;        oNode.text = EnterName.text;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18752.aspx</link><pubDate>Wed, 09 Feb 2005 14:13:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18752</guid><dc:creator>franklb99</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18752.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18752</wfw:commentRss><description>Greg, Thanks a ton!&lt;br /&gt;One last question if you don't mind.  Now with that same bit of functionality, how could I update the "grp_field" when it has a specific value that exists in it already.  Like I set a default value of "update" and then I only want to populate the "grp_field" with the "EnterName" field value when the text of "update" is already in the "grp_field".  Or a blank value which might be expressed as ""  ?&lt;br /&gt;&lt;br /&gt;I probably just need know where to put the If statement.  Something like If oNode.text = "update" then oNode.text = oEnterName.text.&lt;br /&gt;&lt;br /&gt;I will try to figure this out today but I figured I would ask since you could probably do it in 15 seconds.&lt;br /&gt;&lt;br /&gt;Thanks again for your help!&lt;br /&gt;Brian</description></item><item><title>Re: Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18751.aspx</link><pubDate>Wed, 09 Feb 2005 00:35:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18751</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18751.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18751</wfw:commentRss><description>If you want the value in each row to change when the name field changes, then yes, you will need to loop through each row.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;    var oEnterName = XDocument.DOM.selectSingleNode("//my:EnterName");&lt;br /&gt;    var oNodes = XDocument.DOM.selectNodes("//my:group/my:small_grp/my:grp_field");&lt;br /&gt;    var oNode;&lt;br /&gt;    while(oNode = oNodes.nextNode())&lt;br /&gt;    {&lt;br /&gt;        oNode.text = EnterName.text;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Populating repeating table rows with same value</title><link>https://www.infopathdev.com:443/forums/thread/18718.aspx</link><pubDate>Tue, 08 Feb 2005 20:31:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18718</guid><dc:creator>franklb99</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18718.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=18718</wfw:commentRss><description>Using Jscript I can populate a field value based off a value into another field.  When using Repeating tables I can only populate the first row in the table.  I am assuming that I have to loop through the rows but am having issues.  &lt;br /&gt;I have a field where a user enters their name "EnterName" and then I want to populated the "grp_field" that is within a repeating table.&lt;br /&gt;&lt;br /&gt;The code (feeble code attempt) below will work for the top field but not any additional rows.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;    var EnterName = XDocument.DOM.selectSingleNode("//my:EnterName");&lt;br /&gt;    var SetField6 = XDocument.DOM.selectSingleNode("//my:group/my:small_grp/my:grp_field");&lt;br /&gt;    SetField6.text = EnterName.text&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Please let me know if you have any ideas!&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Brian</description></item></channel></rss>