Limiting number of repeating tables a user can add

O

owave_tw

I am creating a browser-enabled InfoPath form. I am using a repeating table,
which enables form users to add (or delete) additional tables. We want to
limit the number of tables in a form to three tables, max. How do I prevent
the user from adding more than 3 repeating tables when filling out the form?
 
F

Frederik Van Lierde

1. Select the repeating control on the Infopath form
2. Select Conditional Formatting
3. Click Add
4. Select Expression
5. count(/my:myFields/my:group2/my:group3) > 2 -> Replace group2 and
group3 with the names from your datasource)
6. Select Don't allow users to insert or delete this control

I have also an article that can be interested to adapt the count
function, to add a filter.
http://blueinfopath.wordpress.com/2009/10/18/preventing-submit-with-empty-repeating-tables/

Let me know if it worked

Cheers
Frederik Van Lierde
http://SilverSandsAssociates.wordpress.com
http://Twitter.com/SilverSands_IT
 
A

Anuma (GGK Tech)

Hi,

Try the below steps to avoid adding more than 3 rows in a table:
1. Open your xsn file in design mode and extract it.
2. Open “mySchem.xsd†file in visual studio.
3. Search for your Repeating group element.
4. Change Max occurs maxOccurs value to 3
5. Save and close the “mySchem.xsd†file.
6. Now verify the form in preview mode. You will not able to add more than 3
rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top