JScript code to save fields as values - InfoPath Dev
in

InfoPath Dev

JScript code to save fields as values

Last post 04-29-2009 05:06 AM by Wheels. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-26-2009 12:44 PM

    JScript code to save fields as values

    Good afternoon.

    I am new to InfoPath 2003 and this is what I am trying to accomplish:

    When a user complete the form, it is sent as an email attachment to several locations. It also submits the data to the main connection DB.

     When a new record is created, the fields in the form are blanked out.

     I want to save the fields as public variables and then when the new form appears populate the fields with the old information.

     I don't know any JScript. Any suggestions?

    Thank you, WHEELS

  • 04-29-2009 05:06 AM In reply to

    Re: JScript code to save fields as values

    Good morning everyone.

     I was able to easily accomplish this in VBScript, but I am still having difficulties with JScript.

     I have the following code:

    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; }

     I know the field (node) references are correct. My theory is there is something arwy with how JScript handles global vaiables.

     Any ideas? Thank you. WHEELS

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