<?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: Dropdownlist  display name in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/14574.aspx</link><pubDate>Wed, 24 May 2006 20:43:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14574</guid><dc:creator>skydolphin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14574.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14574</wfw:commentRss><description>OH I got it!  It ended up looking more like this in the end.&lt;br /&gt;&lt;br /&gt;xdXDocument:GetDOM("GetCategories")/dfs:myFields/dfs:dataFields/ns2:GetCategoriesResponse/ns2:GetCategoriesResult/NewDataSet/Table/SAPCodes/AccountName[../AccountCode = current()] &lt;br /&gt;&lt;br /&gt;Thanks for you help.  That was the little piece that was missing.  Now I can go home for the day since I accomplished something.  Oh if only...&lt;br /&gt;&lt;br /&gt;Rhonda</description></item><item><title>Re: Dropdownlist  display name in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/14573.aspx</link><pubDate>Wed, 24 May 2006 20:31:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14573</guid><dc:creator>skydolphin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14573.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14573</wfw:commentRss><description>Thanks Matt,&lt;br /&gt;&lt;br /&gt;I think I am getting closer.  Here is what I have now and the error message I am getting.&lt;br /&gt;&lt;br /&gt;  &amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt; &lt;br /&gt;- &amp;lt;NewDataSet&amp;gt;&lt;br /&gt;- &amp;lt;Table&amp;gt;&lt;br /&gt;- &amp;lt;SAPCodes&amp;gt;&lt;br /&gt;  &amp;lt;AccountCode&amp;gt;_SYS00000000679&amp;lt;/AccountCode&amp;gt; &lt;br /&gt;  &amp;lt;AccountName&amp;gt;Airfare&amp;lt;/AccountName&amp;gt; &lt;br /&gt;  &amp;lt;SegmentCode&amp;gt;61110&amp;lt;/SegmentCode&amp;gt; &lt;br /&gt;  &amp;lt;/SAPCodes&amp;gt;&lt;br /&gt;- &amp;lt;/Table&amp;gt;&lt;br /&gt;  &amp;lt;/NewDataSet&amp;gt;&lt;br /&gt;&lt;br /&gt;xdXDocument:GetDOM("GetCategories")/NewDataSet/Table/SAPCodes/AccountName[../AccountCode = current()] &lt;br /&gt;&lt;br /&gt;"xdXDocument:GetDOM("GetCategories")/NewDataSet/Table/SAPCodes/AccountCode" does not point to a valid location path of a field or group.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Rhonda</description></item><item><title>Re: Dropdownlist  display name in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/14572.aspx</link><pubDate>Wed, 24 May 2006 19:55:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14572</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14572.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14572</wfw:commentRss><description>Hi Rhonda,&lt;br /&gt;&lt;br /&gt;I get the feeling that you are making this way too complicated that it should be.  I know you wanted specific answers, but have you seen this HowTo?&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If that doesn't help I will try to help you debug your code, but it looks pretty complicated for such a normal task.&lt;br /&gt;&lt;br /&gt;I hope this helps, and stop pulling out your hair!</description></item><item><title>Dropdownlist  display name in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/12873.aspx</link><pubDate>Wed, 24 May 2006 18:44:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12873</guid><dc:creator>skydolphin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12873.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12873</wfw:commentRss><description>Hi everyone,&lt;br /&gt;&lt;br /&gt;I have been pulling my hair out about this for 2 weeks now and I'm getting nowhere.  I hope someone can help.&lt;br /&gt;&lt;br /&gt;I have a repeating table that has a dropdownlist in it.  When the user selects an item in the list, I want to populate two other fields.  One with the value (which is working fine) and the other with the display name.  I need these values to post to a SQL table on submit.  I wrote some code in the onchangeafter event that works for the first dropdown only.  If the user adds another row it doesn't work for that row.  Below is my code.  I kind of understand why it isn't working (no index for the specific control) but I don't know how to make it work.&lt;br /&gt;&lt;br /&gt;var strNewValue = XDocument.DOM.selectSingleNode("/my:ExpenseClaim/my:ExpenseItems/my:CategoryName").text;&lt;br /&gt;var sCo = XDocument.DOM.selectSingleNode("/my:ExpenseClaim/my:EmployeeDetails/my:Company").text;&lt;br /&gt;var sDept = XDocument.DOM.selectSingleNode("/my:ExpenseClaim/my:EmployeeDetails/my:Department").text;&lt;br /&gt;&lt;br /&gt;var theDataObject = XDocument.DataObjects["GetCategories"];&lt;br /&gt;&lt;br /&gt;theDataObject.DOM.selectSingleNode("//*[local-name()='Company']").text = sCo;&lt;br /&gt;theDataObject.DOM.selectSingleNode("//*[local-name()='Department']").text = sDept;&lt;br /&gt;theDataObject.Query();&lt;br /&gt;			&lt;br /&gt;var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");&lt;br /&gt;xmlDoc.async = false;&lt;br /&gt;xmlDoc.loadXML(theDataObject.DOM.xml);&lt;br /&gt;	&lt;br /&gt;var root = xmlDoc.getElementsByTagName("*");&lt;br /&gt;var acctCode, accName;&lt;br /&gt;for (var i=0; i&amp;lt;= (root.length - 1); i++) &lt;br /&gt;{&lt;br /&gt;	if (root.item(i).nodeName == "AccountCode") &lt;br /&gt;	{&lt;br /&gt;		acctCode = root.item(i).text;&lt;br /&gt;		if (acctCode == strNewValue)&lt;br /&gt;		{&lt;br /&gt;			acctName = root.item(i+1).text;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I don't know what to do to make this work.  I thought if I could add the code to a rule that might help but I don't know how to do that.&lt;br /&gt;&lt;br /&gt;Since I am totally lost, very specific answers would be most helpful as all I am finding are generic "You need add code to the function on the datasource default value" answers.  Makes sense, but I don't how to do that or what the code should look like.&lt;br /&gt;&lt;br /&gt;Thanks for your patience and help.&lt;br /&gt;&lt;br /&gt;Rhonda&lt;br /&gt;rhonda@k2workflow.com&lt;br /&gt;</description></item></channel></rss>