Declare XPathNavigator in Browser Enabled Form - InfoPath Dev
in

InfoPath Dev

Declare XPathNavigator in Browser Enabled Form

Last post 01-23-2012 07:54 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-23-2012 03:00 AM

    Declare XPathNavigator in Browser Enabled Form

     Hi,

    How can i declare a  XPathNavigator object in Broser Enabled Form?

     I am getting the following error when i try to upload the form template in sharepoint

    "An issue was found with the following variable 'LOreal.FormCode.newNodeSender'. Member variables are not supported. Use the FormState property to store data."

  • 01-23-2012 07:54 AM In reply to

    Re: Declare XPathNavigator in Browser Enabled Form

    Is there a reason your XPathNavigator needs to be declared as a member variable and not as a variable within a method?  If it must be accessible across methods, you need to do exactly what the message says and use the FormState property.  The code that InfoPath auto-generates explains this quite clearly:

    // Member variables are not supported in browser-enabled forms.
    // Instead, write and read these values from the FormState
    // dictionary using code such as the following:
    //
    // private object _memberVariable
    // {
    //    get
    //    {
    //       return FormState["_memberVariable"];
    //    }
    //    set
    //    {
    //       FormState["_memberVariable"] = value;
    //    }
    // }

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.