change view if there are no errors - InfoPath Dev Sign in | Join | Help in Views InfoPath (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 InfoPath Dev » InfoPath » Views » change view if there are no errors change view if there are no errors Last post 02-06-2009 05:29 AM by tylkomat. 2 replies. Page 1 of 1 (3 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 02-06-2009 04:51 AM tylkomat Joined on 11-27-2008 Posts 23 change view if there are no errors Reply Contact Hallo there, I made a shop with different articles and some have a color to select and some don't. If an article has different colors you have to select one. If you click a button the view will be changed to a summary of the selected articles. I only want to let the view change if there are no errors on this view like that missing color. How can I do that ? Thanks in advance. Matthias 02-06-2009 05:10 AM In reply to swathip Joined on 10-30-2007 India Posts 487 Re: change view if there are no errors Mark as Not AnswerMark as Answer... Reply Contact Hi, Write the following code in the button click event. If(thisXDocument.Errors.Count == 0) { thisXDocument.View.SwitchView("viewName"); } Swathipwww.ggktech.com 02-06-2009 05:29 AM In reply to tylkomat Joined on 11-27-2008 Posts 23 Re: change view if there are no errors Mark as Not AnswerMark as Answer... Reply Contact Thanks for the tip, but I don't have a XDocument object. I work with c# ah i found it.if(this.Errors.Count == 0){ this.ViewInfos.SwitchView("viewName"); } Page 1 of 1 (3 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hallo there,
I made a shop with different articles and some have a color to select and some don't. If an article has different colors you have to select one.
If you click a button the view will be changed to a summary of the selected articles. I only want to let the view change if there are no errors on this view like that missing color.
How can I do that ?
Thanks in advance.
Matthias
Hi,
Write the following code in the button click event.
If(thisXDocument.Errors.Count == 0)
{
thisXDocument.View.SwitchView("viewName");
}
Thanks for the tip, but I don't have a XDocument object. I work with c#
ah i found it.