Limit number of rows in Repeating Table - InfoPath Dev
in

InfoPath Dev

Limit number of rows in Repeating Table

Last post 09-03-2010 12:19 PM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 05-23-2006 08:44 AM

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Limit number of rows in Repeating Table

    I have a form that only displays data from an XML-file generated by another application. The user can not enter data in the form. In this form there is a repeating table with ExpressionBoxes and I only want it to display the last 10 rows from the XML-file. For example: If there is 12 rows in the XML-file the table shall skip the two first and display the rest (10). Is this possible using rules, filters or JScript? (Can not use managed code in this form)
  • 05-23-2006 02:52 PM In reply to

    Re: Limit number of rows in Repeating Table

    Yes, you can do this with a simple data filter on the repeating table.

    Double-click the repeating table, Click Display Tab, and then click Filter Data. Click Add, choose 'The Expression' from the first drop -down. Delete whatever was in the textbox originall and insert this expression:

    position() > last() - 10

    That should do the trick!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-24-2006 01:02 AM In reply to

    • Razor
    • Not Ranked
    • Joined on 02-01-2006
    • Posts 16

    Re: Limit number of rows in Repeating Table

    Thanks Matt!

    A very well working solution.

    Regards
  • 09-03-2010 08:04 AM In reply to

    Re: Limit number of rows in Repeating Table

    How about the other way around.   I only want 3 rows to show, and the max us unlimited?

    Laurie Wheeler
  • 09-03-2010 11:26 AM In reply to

    Re: Limit number of rows in Repeating Table

    Conditional formatting of hide if position() > 3 would do this ... Is this a secondary data source or your main data source? I'm just not sure if what you want to do is limit people to only inserting 3 rows, limit the display of returned data, etc.

    Hilary Stoupa

  • 09-03-2010 11:34 AM In reply to

    Re: Limit number of rows in Repeating Table

    This is the main data source.  The form I'm creating just doesn't need 10 rows (which seems to be the default) to start with.  I'm not sure if its just an InfoPath thing, or something odd that is set in my system.   

     Rarely will a use need to more than 3 rows.  But, we need the form able to do more if required.  If I enter position() >3, the preview shows 7 rows instead of 10.. so using position() >7 the preview shows 3... and I can enter data into the 3 rows... add another row.. and the data inthe first three rows remains.  Does that make any sense?

    I've got what I need, and my form is setup like I want... in that section right now.  :)

    Laurie Wheeler
  • 09-03-2010 12:05 PM In reply to

    Re: Limit number of rows in Repeating Table

    Actually, the default is usually 1. If you look in the Tools menu, under the default values (the Data tab if you are using IP 2010), then find your group, you may find that there are more instances included by default than you want....

    I seem to get > and < mixed up all the time, especially when dealing with hiding controls.....

    Hilary Stoupa

  • 09-03-2010 12:12 PM In reply to

    Re: Limit number of rows in Repeating Table

    I'm using 2007, but I still found it.   the 10 rows must have converted over from word.  the original form is in Word, and has 10 rows.  Now that I removed the extra defaults.  The form as 3 rows like I want it to.  Beautiful.  good to know about the filtering too. thou.

    Laurie Wheeler
  • 09-03-2010 12:19 PM In reply to

    Re: Limit number of rows in Repeating Table

    Hey, thanks for posting what the issue was -- now others who import forms from Word will understand why they have extra rows!

    Hilary Stoupa

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