InfoPath 2007 - Determine which view to display - 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 » InfoPath 2007 - Determine which view to display InfoPath 2007 - Determine which view to display Last post 08-08-2006 07:57 PM by Shiraz Cupala. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 07-24-2006 06:08 AM mikesm Joined on 07-20-2006 Posts 25 InfoPath 2007 - Determine which view to display Reply Contact I have an InfoPath 2007 form created and it is set up to be opened in a browser. I have 3 levels of security that I need to apply:1) Admin - edit entire form2) Creator - edit form w/ excepton of admin section3) All Other - Only view form (admin section hidden)Since this form is browser enabled, I cannot set up User Roles and they are not usable in browser forms. What I want to do is have 3 views, one for each level of security and then determine which view to display when the person opens the form from the SharePoint forms library. I have the default view set up as the All other. But not sure how to switch to the other 2 views.Any help would be appreciated. Thank you.Mike 07-24-2006 06:34 AM In reply to Kalyan Gaddam Joined on 07-18-2005 India Posts 362 Re: InfoPath 2007 - Determine which view to display Mark as Not AnswerMark as Answer... Reply Contact Hello, Did you tried by keeping a Button in the View 1 and Switch views when the button is Clicked.You can keep conditions when to execute this action.Hope this helps you. Kalyan G ReddyInfopath MVP 2007 and 2008 07-24-2006 07:43 AM In reply to mikesm Joined on 07-20-2006 Posts 25 Re: InfoPath 2007 - Determine which view to display Mark as Not AnswerMark as Answer... Reply Contact I need to be able to determine the view as the form is opened. I please some custom code in the load event to do a ViewInfos.SwitchView("View 1");is the username on the machien equals the lanid on the form. However, I received an error indicating that I could not use ViewInfos.SwitchView in the form load event.Not sure how to set this up to work now. 08-07-2006 06:48 AM In reply to mikesm Joined on 07-20-2006 Posts 25 Re: InfoPath 2007 - Determine which view to display Mark as Not AnswerMark as Answer... Reply Contact Ok, I ended up getting this to work by created rules as the fomr opens. My only problem now is that I cant seem to directly check to see if a person is a site admin. For now I had to create an admin contact list in sharepoint and then when my form opens, I use a data connection to see if the username is in this contact group. I would rather check to see if the user is a site admin so I dont have to maintain two lists of admins.How do you verify if the person accessing the form is a site admin? 08-08-2006 07:57 PM In reply to Shiraz Cupala Joined on 08-07-2006 Seattle, WA Posts 443 Re: InfoPath 2007 - Determine which view to display Mark as Not AnswerMark as Answer... Reply Contact I did find some information that looks like it will provide your info.This article describes how to do it in code but of course since it is accessing a web service you should be able to just setup a data connection in InfoPath to the same web service:http://msd2d.com/Content/Tip_viewitem_03NoAuth.aspx?section=SharePoint&id=82C7DFB3-0736-45C0-AEB8-F30614E477F4This is the MSDN documentation for the complete class library and more importantly the web services on SharePoint:http://msdn2.microsoft.com/en-us/library/ms427466.aspx Shiraz Cupala / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.