Add rows to repeating table in InfoPath 2010 - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Add rows to repeating table in InfoPath 2010

Last post 11-17-2017 10:10 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-14-2017 08:33 AM

    Add rows to repeating table in InfoPath 2010

    In InfoPath 2010 I can successfully pull and filter data from an excel REST connection into my main repeating table. However, I have to edit the Default Values and add the number of rows I think I'll need which in some cases can be 300+. Obviously it is not practical to add this amount of new rows to the Default Values. I am searching for a method using rules or code to set a static number of rows in my repeating table when the form loads or to set a number of rows based on my filtering the REST connection. Any help is always appreciated. Thank you.
  • 11-15-2017 01:55 PM In reply to

    Re: Add rows to repeating table in InfoPath 2010

    Using a line of code borrowed from Jimmy Rishe's blog I can add a default number of rows to my repeating table. I used the line for Visual Basic 2007 Public Sub ddlLocation_Changed(ByVal sender As Object, ByVal e As XmlEventArgs) Dim x As Long For x = 1 To 200 CurrentView.ExecuteAction(ActionType.XCollectionInsert, "XmlToEdit") Next x End Sub The link to Jimmy's code is here http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx
  • 11-17-2017 09:25 AM In reply to

    Re: Add rows to repeating table in InfoPath 2010

     Reposting for clarity...

     

    Using a line of code borrowed from Jimmy Rishe's blog I can add a default number of rows to my repeating table.

    I used the line for Visual Basic 2007

    Public Sub ddlLocation_Changed(ByVal sender As Object, ByVal e As XmlEventArgs)

    Dim x As Long

    For x = 1 To 200

    CurrentView.ExecuteAction(ActionType.XCollectionInsert, "XmlToEdit")

    Next x

    End Sub

     

    The link to Jimmy's code is here http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx 

  • 11-17-2017 10:10 AM In reply to

    Re: Add rows to repeating table in InfoPath 2010

    Wonderful - this is an InfoPath filler form? Just want to note that code won't work in the browser. :)
    Hilary Stoupa

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