Programatically add another instance of a repeating Section (HOW?, This is driving me crazy) - InfoPath Dev
in

InfoPath Dev

Programatically add another instance of a repeating Section (HOW?, This is driving me crazy)

Last post 09-27-2007 05:01 PM by RLudington. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-27-2007 02:28 PM

    Programatically add another instance of a repeating Section (HOW?, This is driving me crazy)

    Is there a way to programatically insert another instance of a repeating section, (depending on another event or user selection) ?  The repeating section is tied to a SQL table called Formdata through the Main data connection  .. . 

    I assume its a form of Xdocument, but can not figure this out. and I can find no reference online.

     

    A code snip would be great...  (When we add the sections manually, we reference the data by using a reference to Formdata_1[whatever instance]

    Like this :  (for assigning a value)  (using Jscript)

    to assign a value to the 2nd instance of the repeating section

     

    var fname="Formb";

    XDocument.DOM.selectSingleNode( "/dfs:myFields/dfs:dataFields/d:tbl_FormData_1[2]/@Form_Name").value=fname;

     

    I have been searching for an answer to this for quit a while.  Thanks in advance.

    We are using Infopath 2003.

  • 09-27-2007 04:46 PM In reply to

    Re: Programatically add another instance of a repeating Section (HOW?, This is driving me crazy)

    Just to clarify, you have a datebase based template with subtables?

    Then you want to automate the insert of a repaeting subsection?

    Instead of the user clicking insert new item you want to perform this action based on an event or programatically?

    Is this correct?

  • 09-27-2007 05:01 PM In reply to

    Re: Programatically add another instance of a repeating Section (HOW?, This is driving me crazy)

    Yes, I believe that is correct.  I am fairly new at this and could use the help.  The code in my post is an actual code snip of one of our forms.

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