<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7465.aspx</link><pubDate>Fri, 16 Feb 2007 08:57:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7465</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7465.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7465</wfw:commentRss><description>:)</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7464.aspx</link><pubDate>Thu, 15 Feb 2007 15:07:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7464</guid><dc:creator>jackinthegreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7464.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7464</wfw:commentRss><description>I Got it!! &lt;br /&gt;&lt;br /&gt;My mistake was trying to handle the event based on the control ID when I should have been handling the change in the dataobject DOM. Thanks for your help!, it got me looking on the right track, then found a good example on MSDN.&lt;br /&gt;&lt;br /&gt;Cheers!</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7463.aspx</link><pubDate>Wed, 14 Feb 2007 19:52:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7463</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7463.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7463</wfw:commentRss><description>Do you have any rules defined on the dropdown? Can you double click on the dropdown and choose Rules and Custom Code and tell me what you have?&lt;br /&gt;&lt;br /&gt;For OnAfterChange event handlers you should have code that short-circuits processing if you are in a undo event. This is pretty common. I don't think that InfoPath is stopping as a result of unlimited percolation of events, but it's possible. If so, just add the line to the top of your OnAfterChange event to return if the event is an Undo event.&lt;br /&gt;&lt;br /&gt;Anyway, need more information.</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7462.aspx</link><pubDate>Wed, 14 Feb 2007 19:35:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7462</guid><dc:creator>jackinthegreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7462.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7462</wfw:commentRss><description>Hi Patrick, sorry for the lack of background. here's the post I originally added to newbie forum. &lt;br /&gt;&lt;br /&gt;&amp;lt;excerpt&amp;gt;&lt;br /&gt;Any way to effectively debug a dropdown control's "Some rules not applied. Unspecified error" error? I've got a dropdown that's bound to my main datasource, but populates its options from a secondary data source; which all works fine. But I'm finding that when I apply a rule that depends on a field expression(executes xpath) and then preview the form, no matter which action applied - condition added or no, I get the above uninformative error. I'm using IP 2003 with c# managed code, BTW. &lt;br /&gt;&amp;lt;/excerpt&amp;gt;&lt;br /&gt;&lt;br /&gt;This looks like a managed code thing since I'm getting the same error as the other Patrick trying to do almost precisely the same thing, except I'm using c#. But it looks like he was successfully able to access and handle the OnAfterChange event type from his form code, whereas I cannot; at least not wit this handler; throws an error when I select from the dropdown (ctrl80's the dropdown):&lt;br /&gt;&lt;br /&gt; [InfoPathEventHandler(MatchPath = "CTRL80", EventType = InfoPathEventType.OnAfterChange)]&lt;br /&gt;        public void CTRL80_OnAfterChange(DocActionEvent e)&lt;br /&gt;        {&lt;br /&gt;            thisXDocument.UI.Alert("I'm here");// testing handler&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Any ideas? Thanks!!</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7461.aspx</link><pubDate>Wed, 14 Feb 2007 18:48:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7461</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7461</wfw:commentRss><description>Hi JackInTheGreen,&lt;br /&gt;Can you give me a little more detail? What version of InfoPath are you using? What are the field expressions? If you are using InfoPath 2007, go to Logic Inspector under Tools and reply with a list of the rules you have defined. More soon,</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7460.aspx</link><pubDate>Wed, 14 Feb 2007 16:40:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7460</guid><dc:creator>jackinthegreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7460.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7460</wfw:commentRss><description>I'm getting the same "unspecified error" on trying to update my main view via a dropdown using 2ndary datasource values as options. Publishing didn't help. Get it on any rule that references the field expressions.</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7459.aspx</link><pubDate>Mon, 15 Aug 2005 15:52:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7459</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7459.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7459</wfw:commentRss><description>I only tried it in Preview.</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7458.aspx</link><pubDate>Mon, 15 Aug 2005 06:03:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7458</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7458.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7458</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;That error is strange. I would expect rules to work fine. Maybe it's an issue with preview. Did you try publishing and testing the form from there? Anyway, I will send e-mail to MS about this. Nice bit of sleuthing!  :)&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7457.aspx</link><pubDate>Sat, 13 Aug 2005 15:59:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7457</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7457.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7457</wfw:commentRss><description>UPDATE: The collapsing fields bug went away when I added another view to my template. I didn't change any of the OnAfterChange event handler code. Everything appears to be working fine now.&lt;br /&gt;&lt;br /&gt;I'm sure I could repro this issue if Microsoft is interested. I'll post into the Bugs forum to alert Greg to this issue.</description></item><item><title>Re: Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/7456.aspx</link><pubDate>Sat, 13 Aug 2005 01:16:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7456</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7456.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7456</wfw:commentRss><description>I should add that I'm populating the dropdown menu with the same secondary data source. The selected option's value is then used to match a node in the secondary data source so I can retrieve the rest of the associated data.</description></item><item><title>Problems setting fields based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/4852.aspx</link><pubDate>Sat, 13 Aug 2005 01:08:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4852</guid><dc:creator>pmbarnes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4852.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4852</wfw:commentRss><description>I'm having some major problems trying to do what seems like a simple task: populate fields in the main data source with values from a secondary data source based on the current dropdown menu selection.&lt;br /&gt;&lt;br /&gt;I'm using SP1 and VB.NET.&lt;br /&gt;&lt;br /&gt;I first tried what I thought would be the easiest route: creating a rule set's a field's value when the field associated with the dropdown menu is not blank. In other words, the dropdown menu loads with the first option blank. If the user selects any other option I wanted to use the option's value to filter a set of other values from my secondary data source ("Companies") and display them in expression boxes. Seems really straight forward. But when I preview my form and make a dropdown menu selection I get the exceedingly helpful error message "Some rules were not applied. Unspecified error". There seems to be no valid reason for this.&lt;br /&gt;&lt;br /&gt;Here's an example of the rule's action formula I'm using to set a field's value:&lt;br /&gt;&lt;br /&gt;xdXDocument:GetDOM("Companies")/dfs:myFields/dfs:dataFields/d:Companies/@x86_PCs[../@ID = xdXDocument:get-DOM()/my:myFields/my:NominatedCompany/my:AccessDB_ID]&lt;br /&gt;&lt;br /&gt;So I tried another approach: add code to the dropdown menu's OnAfterChange event handler, such as:&lt;br /&gt;&lt;br /&gt;=========&lt;br /&gt;&lt;br /&gt;Dim dataDOM As DOMDocument50 = thisXDocument.DataObjects("Companies").DOM&lt;br /&gt;dataDOM.setProperty("SelectionNamespaces", "xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" xmlns:d=""http://schemas.microsoft.com/office/infopath/2003/ado/dataFields"" ")&lt;br /&gt;&lt;br /&gt;Dim companyMainDataSourceNode As IXMLDOMNode = thisXDocument.DOM.selectSingleNode("/my:myFields/my:NominatedCompany")&lt;br /&gt;&lt;br /&gt;Dim companySecondaryDataSourceNode As IXMLDOMNode = dataDOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:Companies[@ID = """ &amp; e.NewValue &amp; """]")&lt;br /&gt;&lt;br /&gt;companyMainDataSourceNode.selectSingleNode("my:_x86PCs").text = companySecondaryDataSourceNode.selectSingleNode("@x86_PCs").text&lt;br /&gt;&lt;br /&gt;=========&lt;br /&gt;&lt;br /&gt;This worked great, until I made several dropdown menu selections in the same preview session and the form started collapsing on itself, with fields overlapping, etc. Looks like a nasty InfoPath bug. RATS! Now I have no idea what to do.&lt;br /&gt;&lt;br /&gt;Does anyone have any ideas on how to accomplish this seemingly simple task?</description></item></channel></rss>