How to Detect the Last Table Item in Adobe LiveCycle Designer
Question details
The user needs a method to identify when the final row of a dynamic table is displayed in an Adobe LiveCycle Designer form, particularly when the table spans across multiple pages, so that a specific message can be conditionally shown.

- Product
- Adobe LiveCycle Designer
- Device & OS
- not provided
- Scenario
- Creating dynamic PDF forms with tables that span multiple pages and require conditional logic on the final row.
- Observed behavior
- Needs to trigger a conditional message only after the final table row is completely rendered.
Ensure your form is set up as a Dynamic XML Form and that you have basic familiarity with JavaScript or FormCalc scripting within the LiveCycle Script Editor.
Use JavaScript to Compare Row Instances
Use the instance manager in a form-calculation script to check if the current row index matches the total row count minus one.
By utilizing the Script Editor in LiveCycle Designer, you can dynamically count the occurrences of a repeating row. When the current row's index matches the total count minus one (since indexes are zero-based), you have successfully detected the last item.
Open your form in Adobe LiveCycle Designer. In the Hierarchy palette on the left, click to select the repeating row of your dynamic table.
Navigate to Window > Script Editor to display the scripting panel. Set the Language to 'JavaScript' and the Show event to 'layout:ready' or 'calculate'.
Enter a script to evaluate the row position. For example: if (this.index == this.instanceManager.count - 1) { // Your code to show the message here }. This checks if the current row is the final rendered instance.
Switch to the 'Preview PDF' tab. Add enough data to force the table across multiple pages and confirm that your conditional message only displays after the final table item.

Need a simpler way to manage and edit everyday PDFs?
While Adobe LiveCycle Designer is built for complex, dynamic XML forms, it can be overly technical for standard document tasks. If you need a fast, lightweight, and completely free solution for standard PDF viewing, editing, and form filling—alongside full Office suite capabilities—WPS Office is the perfect alternative.

Frequently Asked Questions
Why does my dynamic table not flow to the next page in LiveCycle Designer?
Ensure that your table and its parent subforms have the 'Allow Page Breaks within Content' option checked in the Pagination palette. Also, verify that the overall document is saved as a Dynamic XML Form rather than a Static PDF.
How do I reference a specific table row in FormCalc?
You can reference a specific row instance using bracket notation in the Script Editor. For example, Table1.Row1[0] targets the very first row instance, while Table1.Row1[*] selects all instances.
Can standard PDF readers process LiveCycle dynamic forms?
Usually, dynamic XFA forms created in LiveCycle Designer require Adobe Acrobat or Reader to function properly. Many third-party readers only support standard AcroForms and may display a compatibility warning instead of rendering the dynamic fields.




