<?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: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8376.aspx</link><pubDate>Thu, 08 Dec 2005 06:54:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8376</guid><dc:creator>DavidCrabbe</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8376.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8376</wfw:commentRss><description>Sorry for the delay in replying. &lt;br /&gt;&lt;br /&gt;I've tested both options and I'm pleased to report that the first suggestion of using OnContextChange works.&lt;br /&gt;&lt;br /&gt;The second suggestion fails when using thisXDocument.View.SelectText because even with the call to thisXDocument.View.ForceUpdate the field isn't yet part of the view.&lt;br /&gt;&lt;br /&gt;Thanks for your help in solving this issue.&lt;br /&gt;David.</description></item><item><title>Re: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8375.aspx</link><pubDate>Fri, 02 Dec 2005 17:15:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8375</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8375</wfw:commentRss><description>Hi,&lt;br /&gt;One idea is to look for the cost node in OnContextChange event when you tab into cost node, keep this event in a global temp variable called previousContextNode.&lt;br /&gt;When your OnContextChange event fires for the next time look if the previousContextNode was cost node. If it is cost node use  thisXDocument.View.SelectText or thisXDocument.View.SelectNodes to select your newly visible node, because by now your visible event might have fired.&lt;br /&gt;&lt;br /&gt;Another Idea is write an OnAfterChange Event on cost node. In the OnAfterChange method use thisXDocument.View.ForceUpdate(), after this statement use thisXDocument.View.SelectText or thisXDocument.View.SelectNodes to select appropriate node.&lt;br /&gt;&lt;br /&gt;Please post back if any of these solutions work.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8374.aspx</link><pubDate>Fri, 02 Dec 2005 08:25:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8374</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8374.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8374</wfw:commentRss><description>I've asked Agni to respond. Some random ideas from me:&lt;br /&gt;1. Look at Tab Order&lt;br /&gt;2. Look at OnBeforeAfter&lt;br /&gt;3. Look at Some kind of special conditional rule (ala Set Field's value)&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8373.aspx</link><pubDate>Fri, 02 Dec 2005 04:59:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8373</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8373.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8373</wfw:commentRss><description>I was hoping someone else would tune in and shed some light...</description></item><item><title>Re: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8372.aspx</link><pubDate>Fri, 02 Dec 2005 03:46:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8372</guid><dc:creator>DavidCrabbe</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8372.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8372</wfw:commentRss><description>Thanks for that.  Good to see I'm not alone in this issue.</description></item><item><title>Re: Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/8371.aspx</link><pubDate>Tue, 29 Nov 2005 14:37:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8371</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8371.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8371</wfw:commentRss><description>I was able to create the exact thing you are describing.  Maybe someone else has seen this issue before, I have not come across.  Going back to .NET WinForms days, and from what I see with my little example, is that Conditional Formatting is not applied until you tab out of the textbox control.  When you tab out, it goes to the next visibile control and then conditional formatting is applied.&lt;br /&gt;&lt;br /&gt;To create issue &amp;gt;&amp;gt; create a simple form with a blank data source &amp;gt;&amp;gt; drop on three textboxes &amp;gt;&amp;gt; set conditional formatting on the second &amp;gt;&amp;gt; the conditional formatting rule would be if field1 is blank, hide field2 &amp;gt;&amp;gt; preview the form &amp;gt;&amp;gt; type text into field1 and when you tab you go to field3, not field2.&lt;br /&gt;&lt;br /&gt;I tried doing something like XDocument.View.SelectNodes(XDocument.DOM.selectSingleNode("//my:field2")); in the OnAfterChange event but that will not work either becuase field2 has not been made visible yet.  So the OnAfterChange event is being raised before conditional formatting.&lt;br /&gt;&lt;br /&gt;That is as far as I can get right now...</description></item><item><title>Moving focus to conditionally formatted fields</title><link>https://www.infopathdev.com:443/forums/thread/5139.aspx</link><pubDate>Tue, 29 Nov 2005 04:29:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5139</guid><dc:creator>DavidCrabbe</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5139.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5139</wfw:commentRss><description>I'm having some hassles with moving the focus within my InfoPath form in response to user activity.&lt;br /&gt;&lt;br /&gt;By way of background, there exists a field on the form which contains the monetary cost of an item to be purchased.  When the cost is above a certain threshold a purchasing code is to be entered by the user.  I have hidden the purchasing code field by conditional formatting until a suitable value is entered to the cost field.&lt;br /&gt;&lt;br /&gt;The problem is that when the user presses the tab key after entering the cost, the focus bypasses the newly displayed field (which logically should be the next field to be filled in) and jumps to next control.  How can I get the focus to move to the purchasing code field?  &lt;br /&gt;&lt;br /&gt;I've tried thisXDocument.View.SelectText in the OnAfterChange event handler but it falls over - presumably because during execution of the event handler the unhidden field isn't yet part of the View, ie it's still hidden until the event handler has completed.&lt;br /&gt;&lt;br /&gt;OnContextChange doesn't work because the Context is always the evaluated after the change and I can't be sure the focus has changed from the cost field or not.&lt;br /&gt;&lt;br /&gt;Any thoughts, greatly appreciated.&lt;br /&gt;David.</description></item></channel></rss>