InfoPath 2003 / VBScript Reference bound (form) field names - InfoPath Dev
in

InfoPath Dev

InfoPath 2003 / VBScript Reference bound (form) field names

Last post 04-24-2009 07:34 AM by Wheels. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-15-2009 06:45 AM

    InfoPath 2003 / VBScript Reference bound (form) field names

    Good morning.

    I struck out with JScript so now I am using VBScript.

    I have the following functions:

    Public Function StoreFields()

    Dim Lockbox, Cash_Deposit_Date, Batch_Number

    Lockbox=XDocument.DOM.selectSingleNode("dfs:myFields/my:Lockbox");

    Cash_Deposit_Date=XDocument.DOM.selectSingleNode("dfs:myFields/my:Cash_Deposit_Date");

    Batch_Number=XDocument.DOM.selectSingleNode("dfs:myFields/my:Batch_Number");

    End Function

    Public Function PopulateFields()

    XDocument.DOM.selectSingleNode("dfs:myFields/my:Lockbox")= Lockbox;

    XDocument.DOM.selectSingleNode("dfs:myFields/my:Cash_Deposit_Date") = Cash_Deposit_Date;

    XDocument.DOM.selectSingleNode("dfs:myFields/my:Batch_Number") = Batch_Number;

    End Function

    The reference to the form fields appear to be incorrect. Under my Data Source (main connection) I have: myFields --> dataFields --> d:tbl_GC100 --> :Lockbox, :Cash_Deposit_Date, and :Batch_Number.

    How do I reference these fileds correctly? There are several fields bound to the form that I can reference correctly.

    Thank you, WHEELS

     

  • 04-19-2009 05:46 PM In reply to

    Re: InfoPath 2003 / VBScript Reference bound (form) field names

    If you save your form as source files, you can look at template.xml or sampledata.xml to see your main data source XML, this may help you get the XPath to your data nodes correct. I'd guess that it is going to be "dfs:myFields/dfs:dataFields/d:tbl_GC100/@Lockbox".

    Hilary Stoupa

  • 04-24-2009 07:34 AM In reply to

    Re: InfoPath 2003 / VBScript Reference bound (form) field names

    Thank you Hillary.

    WHEELS

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