I actually had the same requirement and this is how I solved for it. I was building a ticket form for 3 types of tickets. on initial load of the form I have a "Main" view (only loads once) that allows the user to select the type of ticket. Now you can get this value from the URL if you want or how ever you are now, but you have to at least know this value of the view. When the user clicked one of three buttons I set a field "TicketType" to the view value. The is a hidden field and doesn't change on my form, but most likely will on yours. So you just need either on save or some change event set the value of that field to your view name. OnForm load I run a little piece of code to set the default view which that value is pulled from the field "TicketType", maybe yours is "ViewName". So in the FormEvents_Loading I put this code. the value of my "TicketType" field is my default view
// Create an XPathNavigator object for field - the field for switching the View
XPN DefaultView = CreateNavigator().SelectSingleNode("xpath to field", NamespaceManager);
// Make sure that the XPathNavigator object is not null or an empty string
if (DefaultView != null && DefaultView.Value != "")
{
e.SetDefaultView(DefaultView.Value);
}
let me know if you have any questions