InfoPath 2003 / JScript / pass node to variable - InfoPath Dev
in

InfoPath Dev

InfoPath 2003 / JScript / pass node to variable

Last post 05-04-2009 10:24 PM by swathip. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-01-2009 12:42 PM

    InfoPath 2003 / JScript / pass node to variable

    Good afternoon.

    I got my code to work in VBScript, but unfortunately I have to get it working in JScript.

    I have the following:

    var Lockbox;

    var Cash_Deposit_Date;

    var Batch_Number;

    function StoreFields() {

    Lockbox = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Lockbox").Text; 

    Cash_Deposit_Date = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Cash_Deposit_Date").Text;

    Batch_Number = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Batch_Number").Text;

    }

    When I load the form, it comes up with an error and states the variable fields are undefined?

    Anyone know what's going on?

    Thank you, WHEELS

  • 05-04-2009 10:24 PM In reply to

    Re: InfoPath 2003 / JScript / pass node to variable

    Hi,

    Use the following code.

    var Lockbox = null;

    var Cash_Deposit_Date = null;

    var Batch_Number = null;

    function StoreFields() {

    Lockbox = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Lockbox").Text; 

    Cash_Deposit_Date = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Cash_Deposit_Date").Text;

    Batch_Number = XDocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Batch_Number").Text;

    }

     

     

    Swathip
    www.ggktech.com
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.