Views are not loading - InfoPath Dev
in

InfoPath Dev

Views are not loading

Last post 08-19-2009 04:51 AM by tincup1983. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-18-2009 09:31 AM

    Views are not loading

    Hello everyone,

    I am hoping someone can help me out with this as I have been banging my head against the keyboard all morning. I have a relative simple form with 4 views (each view represents a page in the form). There is some managed code in the loading method which sets the value of a field based on a sharepoint list item. The form is set up as a content type for a forms library in a forms authenticated sharepoint site. Whenever i create a new form, the default view loads fine. However, whenever I try to change the view (either with the out of the box menu at the top, or with a button I created with a rule) the browser window goes blank except for the menu at the top. Does anyone have any idea whats going on? Any help or clues would be greatly appreciated!

    Thanks!

  • 08-18-2009 11:19 PM In reply to

    Hi Tincup1983,

    We'd have to look at your form and your code. Can you add those here?

    Patrick Halstead
    Project Manager at Qdabra
  • 08-19-2009 04:51 AM In reply to

    Hi - thanks for your response. Unfortunately I have no way to link to the form, but here is the only code i have written:

     public void FormEvents_Loading(object sender, LoadingEventArgs e)
            {
                SPSite currentSite = SPContext.Current.Site;
                SPWeb currentWeb = SPContext.Current.Web;
                string idType = string.Empty;

                // Write your code here.
                XPathNavigator absenceForm = this.CreateNavigator();
                XmlNamespaceManager ns = this.NamespaceManager;

                            SPList claimVariables = currentWeb.Lists["Claim Variables"];

                            foreach (SPListItem item in claimVariables.Items)
                            {
                                if (item.Title.Equals("ID_indicator"))
                                {
                                    idType = item.GetFormattedValue("Value");
                                }
                            }

                absenceForm.SelectSingleNode("/my:myFields/my:employee_information/my:idIndicator", ns).SetValue(idType);

                if (idType.Equals("ssn"))
                {
                    absenceForm.SelectSingleNode("/my:myFields/my:employee_information/my:empId", ns).SetValue("empty");
                }
            }

     

    I also discovered that if I load this form from an extended site without forms authentication, it works fine. Any ideas there?

     Thanks!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.