Switch Views via Code and Rules - Greg Collins

InfoPath Dev

This Blog


Greg Collins

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 handlers for buttons in the form or on toolbars. The Switch View rule action is only available on buttons.

Although there are many reasons to want to switch views during other events, InfoPath will not allow these. If you attempt to switch views during an unsupported event, you will receive an error dialog box, as shown in Figure 1.

Figure 1. The error dialog box for an invalid view switch attempt.

©2005 Greg Collins. All rights reserved. Licensed to Autonomy Systems, LLC for display on InfoPathDev.com.

Published Jun 10 2005, 03:04 PM by Greg Collins
Filed under: , ,


No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.