These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Limiting the number of Rows on Acrobat File

ocdutchman
Registered: Jan 9 2009
Posts: 5

I'm trying to modify an existing invoice template using LiveCycle Designer 8.0. The template has a row that I use to select an item. When viewing in LC Designer, I see just one row (has "+" and "-" boxes), but when I view it in Acrobat there are 7 rows, which forces 2 pages. I can delete one of the rows by clicking "-". However, even after saving after the correction, the 7th row appears the next time I open the file. Is there a setting somewhere so I can limit the number of rows?

I also am using Acrobat Pro 9.0 by the way.

Thanks for your help!

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
In Designer you can define Min and Max counters for your rows in the tab "object" under "bindings".
Set Min to 1 and Max to something else.

To delete a single row you should put the "- button" to the first row with a JS.
Every new row that have been created will have this button and by clicking on it you delete always the current one only.

// Invoke the Instance Manager to remove the current instance of the Row subform.
RowName.removeInstance(this.parent.index);
// Invoke the recalculate method to update the form calculations.
xfa.form.recalculate(1);To add a rows use a "+ button" that you put into the headline of your template (not into the row).
Every click adds a new row at the bottom of your template.

// Invoke the Instance Manager to add one instance of the Row subform.
Template.RowName.addInstance(1);
//Invoke the recalculate method to include the field values from the added row in calculations.
xfa.form.recalculate(1);

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

ocdutchman
Registered: Jan 9 2009
Posts: 5
Thanks radzmar. I found where to change the Min and Max, as mentioned in your post. It's interesting that when I select for example Min = 4, Max= 7+, initial=4 (or zero), the form still shows more than 4 rows when you open it. If I change the Max to 6, I get six rows, which is the max that will fit on the page. This would be fine, but there could be a time when I want 7+ rows, which will not be allowed if I use 6 as my Max.

Unless you know why I'm having these issues, I guess I will settle for telling my client to delete the rows if not being used. Not a big deal, but it looks cleaner if he doesn't have to do that.

The Java Script luckily was already written by whoever designed the template I am using. If it wasn't I wouldn't know what to do with the JS you gave me. I have a lot of respect those of you who know this stuff!! I don't have the time to figure this stuff out, but wish I did. Would come in handy to be able to build forms. I assume there are people for hire to do that?


Thanks again for your help.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
In the binding tab there is also a start count, that might be set to 4 in your case.
Set it to 1 and uncheck the box for the Max count, so there will be no limitation of rows and the form starts with 1 row.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs