<?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>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17189.aspx</link><pubDate>Fri, 27 Jan 2006 22:04:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17189</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17189.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17189</wfw:commentRss><description>DrValium... here's an update that should get you rolling:&lt;br /&gt;&lt;br /&gt;The solution required two things:&lt;br /&gt;&lt;br /&gt;1) current() represented the NODE d:Registering, and not the ATTRIBUTE @Arbetsuppgift, therefore the correct filter is expressed as "../@Element = current()/@Element"&lt;br /&gt;&lt;br /&gt;2) Once you update the filter, the Value and Display Name fields of the drop-down list get reset to ".", which if not updated back to @Value and @id respectively, leaves the list looking blank.&lt;br /&gt;&lt;br /&gt;With both of these adjustments in place, the repeating cascading lists work as expected.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17188.aspx</link><pubDate>Fri, 27 Jan 2006 13:37:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17188</guid><dc:creator>gbgeek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17188.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17188</wfw:commentRss><description>Thanks for your help!</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17187.aspx</link><pubDate>Fri, 27 Jan 2006 00:22:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17187</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17187.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17187</wfw:commentRss><description>Hi gbgeek,&lt;br /&gt;&lt;br /&gt;There's no right answer as to whether to use code or filters. Filters are less work so long as you understand how to set them up correctly. If you are not inside a repeating table, it is a lot easier. Inside a repeating table, having a correct understanding of how to use current() makes all the difference.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17186.aspx</link><pubDate>Thu, 26 Jan 2006 20:29:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17186</guid><dc:creator>gbgeek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17186.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17186</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I have a question that is similar in nature to this question. I have two drop-down lists (one is facility and the other is department). I found code online to change the department drop-down to show only departments for the selected facility. That code was here:&lt;br /&gt;&lt;br /&gt;&lt;a href='http://radio.weblogs.com/0131777/stories/2004/03/09/howToDynamicallyPopulatingADropDownControl.html' target='_blank' title='http://radio.weblogs.com/0131777/stories/2004/03/09/howToDynamicallyPopulatingADropDownControl.html'&lt;a target="_blank" href=http://radio.weblogs.com/0131777/stories/2004/03/09/howToDynamicallyPopulatingADropDownControl.html&gt;http://radio.weblogs.com/0131777/stories/2004/03/09/howToDynamicallyPopulatingADropDownControl.html&lt;/a&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, I now get an error message when I attempt to submit the form data to the database. The data goes, but I receive an error message on the WHERE clause of the script code.&lt;br /&gt;&lt;br /&gt;As I was reviewing this post, I noticed that a filter was being used to create the cascasding between the drop-down lists. I am not sure how to filter the drop-down lists to make this work. Both drop-down lists that I have are from secondary data sources (Access tables). The primary data source also pull from the Access table.&lt;br /&gt;&lt;br /&gt;Is the code-based way correct or should I be using a filter to achieve this cascade effect?</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17185.aspx</link><pubDate>Thu, 26 Jan 2006 17:49:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17185</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17185.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17185</wfw:commentRss><description>Okay, as best as I can figure out, from what you've provided me (assuming I understand correctly), you have:&lt;br /&gt;&lt;br /&gt;DD1 is bound to [AccessDB]/myFields/dataFields/d:Register/Element&lt;br /&gt;DD2 is bound to [AccessDB]/myFields/dataFields/d:Register/Task&lt;br /&gt;&lt;br /&gt;where d:Register is a repeating node.&lt;br /&gt;&lt;br /&gt;Then you populate DD1 from the XML file using the XPath dataFields/Register/@Element&lt;br /&gt;And you populate DD2 from the same XML file using the XPath dataFields/Register/Task (using @id and @Value as the value and display name)&lt;br /&gt;&lt;br /&gt;You want DD2 to only show those Tasks for which the ../Register/@Element is the same as the selected Element (namely [AccessDB]/myFields/dataFields/d:Register/Element)&lt;br /&gt;&lt;br /&gt;Because you are in a repeating structure, you WILL need to use the current() function. BUT!! You must know what node current() refers to in order for this to work properly. In this case, it appears that current() is equivelant to the same node that DD2 is bound to (namely [AccessDB]/myFields/dataFields/d:Register/Task)&lt;br /&gt;&lt;br /&gt;So your XPath, including the filter (in '[]') for DD2 would look something like:&lt;br /&gt;&lt;br /&gt;dataFields/Register/Task[../@Element = current()/../Element]&lt;br /&gt;&lt;br /&gt;So then, you are comparing the attribute @Element on the parent node to Task, which is Register, to the selected value in node Element in the Main DOM, on the current row, which is (starting from the 'current()' node of Task) ../Element. Note the ".." gets you back to the current Register node, and then from there, go to the Element node.&lt;br /&gt;&lt;br /&gt;You would select the left-side comparison (../@Element) as you normally do in your filter dialog, and then use a formula to type in the right-side comparison (current()/../Element).&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17184.aspx</link><pubDate>Wed, 25 Jan 2006 07:19:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17184</guid><dc:creator>DrValium</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17184.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17184</wfw:commentRss><description>Hi Greg,&lt;br /&gt;&lt;br /&gt;I have created the form from an access database (primary data connection) and the data source layout looks like this:&lt;br /&gt;&lt;br /&gt;&amp;gt;myFields&lt;br /&gt;&amp;gt;&amp;gt;     dataFields&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         d:Register&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Register no&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Employee&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Date&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Element&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Task&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;         Time&lt;br /&gt;&lt;br /&gt;I have creating a repeating cascading drop-down list based on the 'Element' and 'Task' fields above.&lt;br /&gt;&lt;br /&gt;The data in the drop-down list is gathered from a secondary data connection (an xml source) which looks something similar to this (this give you an idea of the structure anyway):&lt;br /&gt;&lt;br /&gt;&amp;lt;dataFields&amp;gt;&lt;br /&gt;  &amp;lt;Register Element="CompanyA"&amp;gt;&lt;br /&gt;  &amp;lt;Task id="Batching files" Value="01H" /&amp;gt;  &lt;br /&gt;  &amp;lt;/Register&amp;gt;&lt;br /&gt;  &amp;lt;Register Element="CompanyB"&amp;gt;&lt;br /&gt;  &amp;lt;Task id="Reconciliation" Value="03H" /&amp;gt;  &lt;br /&gt;  &amp;lt;/Register&amp;gt;&lt;br /&gt;&amp;lt;/dataFields&amp;gt;&lt;br /&gt;&lt;br /&gt;Now in the first drop down list I can choose either 'CompanyA' or 'CompanyB' which works without any problems. In the second drop box I generate the data by choosing the field 'Element', and specify the 'ID' and 'Value' in order to see one value in the drop down list box but register another value in the database.&lt;br /&gt;&lt;br /&gt;In order to avoid data cross over effects, I create a filter with the following structure in the second drop down list box:&lt;br /&gt;&lt;br /&gt;"Element is equal to current()/my:Element"&lt;br /&gt;&lt;br /&gt;However, this generates no values in the drop down box which lets me assume that I am doing something wrong, but I am not sure where  I go wrong or if I am trying to do something that can't be done. According to your tutorial on repeating cascading lists this should work, no?&lt;br /&gt;&lt;br /&gt;Thank you for all the help you can provide&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Johan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17183.aspx</link><pubDate>Tue, 24 Jan 2006 17:57:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17183</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17183.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17183</wfw:commentRss><description>Will you provide more technical information of what you are doing, such as actual code snippets. It is difficult to ascertain the problem at this point.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17182.aspx</link><pubDate>Tue, 24 Jan 2006 15:29:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17182</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17182.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17182</wfw:commentRss><description>Also, you might have already seen these, but there are several HowTos that Greg has written concerning cascading lists:&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?s=Lists&gt;http://infopathdev.com/howto/tutorials/default.aspx?s=Lists&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17181.aspx</link><pubDate>Tue, 24 Jan 2006 11:31:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17181</guid><dc:creator>DrValium</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17181.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17181</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;Thank you for the welcome and I greatly appreciate any help either you or Greg can give me=)&lt;br /&gt;&lt;br /&gt;Johan</description></item><item><title>Re: Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/17180.aspx</link><pubDate>Tue, 24 Jan 2006 05:43:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17180</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17180.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17180</wfw:commentRss><description>Hi Johan and welcome to our forum,&lt;br /&gt;I think it's an issue with your xpath. I'll ask Greg to chime in here.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Cascading list issue</title><link>https://www.infopathdev.com:443/forums/thread/16776.aspx</link><pubDate>Mon, 23 Jan 2006 14:54:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16776</guid><dc:creator>DrValium</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16776.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16776</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I have created a form based on a database in Access (primary connection). I have in this form a repeating cascading drop-down list.&lt;br /&gt;&lt;br /&gt;When I use the filter "'First drop-down'='First drop-down'" the cascading list works, however as would be expected with data cross over effects (which gets a bit annoying after few selections).&lt;br /&gt;&lt;br /&gt;I got the understand after reading articles that the 'current()' function in a filter would solve this. I write "'First drop-down'=current()/my:'First drop-down'" but this generates no options in the second drop-down list. &lt;br /&gt;&lt;br /&gt;Is it not possible to eliminate the data cross over effects if you are using a database as your primary connection?  Or are I perhaps referencing the wrong field by using 'my:'?&lt;br /&gt;&lt;br /&gt;Any suggestions would be appreciated.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Johan</description></item></channel></rss>