Code - Greg Collins Sign in | Join | Help in Current Tags Greg Collins Tutorials (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads This Blog Home About Syndication RSS Atom Comments RSS Recent Posts Swap the AD Alias and Name Fields in Place Create a Split Public/Private Form Display a Save As Dialog Box Highlight the Active Field Use the SharePoint '[Me]' Filter with a Promoted Property Tags Active Server ADWS Alias ASPX Background Borders Bugs Bullets and Numbering Buttons Cache Cascading Check Boxes Code concat() Conditional Formatting Conditional Visibility copy-of count Cross-Domain current Data Validation Debugging DisplayName domEventHandlers E-Mail Error Errors Events Expression Boxes Extract Form Files File Extension File Types Filters Focus Footer Formatting Forms Full Trust GetNamedNodeProperty Greg Collins Header Help Hyperlinks Internet Explorer Lists Managed Code Me Namespaces New NewFromSolution NewFromSolutionWithData number Numbered Lists OnAfterChange OnClick OnContextChange OnLoad OnSwitchView Operating System Option Buttons Outlook Picture Pictures position preceding preceding-sibling Preserve Code Blocks Printing processing-instructions Promoted Property References RegForm Repeating Sections Repeating Tables Rich Text Boxes Roles Rules Save As Schema Script Secondary Data Sources Sections Security SetNamedNodeProperty SharePoint SQL Style Sheets Submit Task Panes Template Text Boxes Tile Views Visual Studio Warning Windows Explorer Workarounds xdExtension xdXDocument XPath Archives October 2009 (1) April 2009 (1) March 2006 (1) November 2005 (1) September 2005 (1) July 2005 (4) June 2005 (24) March 2005 (2) January 2005 (1) November 2004 (1) October 2004 (1) September 2004 (6) August 2004 (5) July 2004 (20) June 2004 (5) Greg Collins Browse by Tags All Tags » Code (RSS) Bugs Buttons Data Validation Events Greg Collins Lists Managed Code NewFromSolutionWithData OnClick OnLoad processing-instructions Rules Script Views Workarounds xdExtension Switch Views During the OnLoad Event InfoPath provides the SwitchView method to allow you to programmatically switch views from within your code. But SwitchView is a method of the View object, which does not exist until after the OnLoad event has completed. Any attempt, therefore, to use... Posted Jun 27 2005, 03:16 PM by Greg Collins with | with no comments Filed under: OnLoad, Code, Views Prevent Field Validation From Occurring OnLoad The OnValidate event fires for each field in your main DOM before the OnLoad event is fired. This allows you to write validation code to add custom errors to the Errors collection for invalid fields before the user ever sees the view. This might be necessary... Posted Jun 16 2005, 06:53 AM by Greg Collins with | with no comments Filed under: Data Validation, Code Switch Views via Code and Rules There will be times when you will want to switch views during unsupported events, such as the OnAfterChange event. Due to technical reasons in the underlying platform, InfoPath only allows you to switch views during the OnLoad event and the OnClick event... Posted Jun 10 2005, 03:04 PM by Greg Collins with | with no comments Filed under: Rules, Code, Views Keep Track of List Selections At some point it might be necessary to keep track of order of the selections a user makes in a single list box or drop-down list box. You can accomplish this by writing your own code in an OnAfterChange event handler, or you can use rules. In this task... Posted Jun 09 2005, 06:56 AM by Greg Collins with | with no comments Filed under: Rules, Code, Lists Use Code to Determine a Rule Condition One of the great and power features InfoPath provides is the xdExtension prefix. This feature allows your form to call into your code from areas like conditional formatting. It provides you with greater flexibility in determining the validity of a condition... Posted Sep 15 2004, 05:20 PM by Greg Collins with | with 7 comment(s) Filed under: Rules, Code, xdExtension, Greg Collins Order of Processing at OnClick In InfoPath, the order of processing when a user clicks a button is: Rules Code When you write your OnClick event handler, take into account that any rules associated with the button will be processed before the code is reached. This can be very useful... Posted Jul 15 2004, 10:00 AM by Greg Collins with | with no comments Filed under: Rules, Code, Buttons, OnClick Populate a Drop-Down List Box via Code NOTE: This article was written for the original InfoPath 2003, which did not support secondary data sources. You can still use code to populate a drop-down list box, but the better approach is to have the drop-down list populate from a secondary data... Posted Jul 12 2004, 12:31 PM by Greg Collins with | with 8 comment(s) Filed under: Code, Lists Avoid an Endless Loop During Event Bubbling Event bubbling means that when an event, such as the OnAfterChange event, happens on a particular data node in an XML tree, that event is passed up to the parent node, and then the grandparent node, and so on, all the way back to the root node. Thus the... Posted Jul 07 2004, 08:04 PM by Greg Collins with | with no comments Filed under: Code, Events The Case of the Missing PI DAY 1 (2004-06-24) I was just working with a set of forms where a non-managed code (i.e. JScript)—hereafter referred to as NMC—form launches a managed code (i.e. C#)—hereafter referred to as MC—form and passes in its data using... Posted Jun 24 2004, 05:57 PM by Greg Collins with | with no comments Filed under: OnLoad, Managed Code, Code, NewFromSolutionWithData, processing-instructions, Workarounds, Bugs, Script Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.