Help! passing parameters from form1 to form2 via URL - InfoPath Dev
in

InfoPath Dev

Help! passing parameters from form1 to form2 via URL

Last post 10-31-2011 05:26 PM by aroddy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-31-2011 11:41 AM

    • aroddy
    • Not Ranked
    • Joined on 10-31-2011
    • Posts 2

    Help! passing parameters from form1 to form2 via URL

    Hello,

     I'm trying to pass parameters to field type - 'date' and 'decimal double,' but I'm having trouble with the syntax.

    I can pass string parameters fine, just having issues with the other data types..  any help good be great.

     _______________________________________________________ 

    XmlNamespaceManager ns = this.NamespaceManager;
                XPathNavigator xnMain = this.MainDataSource.CreateNavigator();
                XPathNavigator xnField;
                string Parameter = string.Empty;
                string dParameter = ValueAsDouble;
              
               
          
                // Assign the value of the parameter 'D' to /my:myFields/my:FirstName
                dParameter = ValueAsDouble;
                if (e.InputParameters.TryGetValue("D", out dParameter))
                {
                    xnField = xnMain.SelectSingleNode("/my:myFields/my:Decimal", ns);
                    xnField.SetValue(dParameter);
                }
  • 10-31-2011 04:15 PM In reply to

    Re: Help! passing parameters from form1 to form2 via URL

    The SetValue method takes a string - What is "ValueAsDouble" in your code above?

    At any rate, if your field allows nulls, your issue may be that your aren't removing the nil attribute prior to setting it - are you getting an error message when you simply set your "my:Decimal" field to the string you are passing in?

    Hilary Stoupa

  • 10-31-2011 05:26 PM In reply to

    • aroddy
    • Not Ranked
    • Joined on 10-31-2011
    • Posts 2

    Re: Help! passing parameters from form1 to form2 via URL

    Hi Hillary,

     Thanks for the reply -

    The valueAsDouble was just something i saw on the net; i thought i'd try out.

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