Limit Rows in Table

F

Farmboy

We have form with table to record 1 week's [7 days] worth of values, but no
more.

How can a designer set the Max Row?

Thank you in advance!
 
G

Greg Collins

Unfortunately, InfoPath currently only lets you completely disable
add/remove as a combo with conditional formatting. It would be nice to have
those separated, but that's not the case.

You can use code to accomplish what you want, or you can hand-edit the
schema to put min/max limits on that table node.
 
S

S.Y.M. Wong-A-Ton

An easy way to do this without writing any code is to pre-populate the
repeating table with 7 rows when designing the form template via the Tools >
Default Values menu, and then remove the option to "Allow users to insert and
delete rows" via the Properties dialog box of the repeating table.
 
F

Farmboy

Thanks so much, very helpful.

Swathi (GGK Tech) said:
Hi,

One way is set the max occurs attribute to in the schema for that repeating
node. To do that follow the below steps.
1.Open the form in design mode.
2.Go to File -> Save as source files.
3.Save the files in a folder.
4.Go to that folder and open the myschema.xsd in an editor mode.
5.Search for the repeating node.
6.Add maxOccus =â€7†attribute. It looks like the following expression.

<xsd:element ref="my:group2" minOccurs="0" maxOccurs="3"/>

--
Swathi Porandla
http://www.ggktech.com



Farmboy said:
We have form with table to record 1 week's [7 days] worth of values, but no
more.

How can a designer set the Max Row?

Thank you in advance!
 

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