DCSIMG
InfoPath – Limit the number of items in repeating table - itaysk

InfoPath – Limit the number of items in repeating table

Posted Wednesday, April 14, 2010 12:07 AM by Itay Shakury

Credit for this cool trick goes to Ziv Cohen (from BSP)who found and showed it to me.

If you want to limit the number of items in a repeating table, there no apparent way in the UI to do it. Here’s a quick way to do it without writing code.

  1. On a form with a repeating table. Pay attention to the Group that the Repeating table is bound to.
    repeatingtable_1
  2. Get the source files of the form. (in 2007: File –> Save as source files. in 2010: File->Publish->Export Source Files)
  3. Close InfoPath.
  4. Open the schema file. It’s the file with XSD extension.
  5. Find the part representing the Group of the Repeating table (from step 1), and it’s sequence in it’s parent group.
    repeatingtable_2
  6. The group should have an attribute called “maxOccurs”
  7. This is what we’re looking for, set your limit here. (any number)
  8. Open the modified form in InfoPath (the easiest way is right click on manifest.xsf and click “Design”)
  9. Continue your editing… When you’re done just save the file as normal XSN, and you can dump the source files.

When you fill out the form, you won’t be able to fill more items then what you’ve specified in the schema file

This should work for browser forms too.

Comments

# Twitter Trackbacks for InfoPath ??? Limit the number of items in repeating table - itaysk [microsoft.co.il] on Topsy.com

Pingback from  Twitter Trackbacks for                 InfoPath ??? Limit the number of items in repeating table - itaysk         [microsoft.co.il]        on Topsy.com

# re: InfoPath – Limit the number of items in repeating table

Wednesday, April 14, 2010 9:29 AM by Ziv Cohen

Thanks for the credit :)

# re: InfoPath – Limit the number of items in repeating table

Wednesday, April 14, 2010 10:02 PM by Itay Shakury

Thanks for the tip:)

# re: InfoPath – Limit the number of items in repeating table

Wednesday, March 16, 2011 5:06 PM by Kim Skirvin

works great!  I'm not a developer but was able to figure it out.

Thank you.

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: