Expand my Community achievements bar.

How to display four rows in one table and the rest in another table?

Avatar

Former Community Member

Hello everybody,

I am trying to solve a problem that I cannot find any direct answers to.  In essence the problem goes like this:

1) I want to populate two tables from xml data.

2) The first table should only diplay the first four rows of data.

3) The second table should display the rest of the rows (starting from row 5).

I can create the first table so that it only shows up to the first four rows.

I cannot find a way to set up the second table so that it shows the rest of the rows starting at row 5.

To illustrate the problem I have attached my livecycle template file with the two table definitions and the corresponding xml data.  If you put these two files in the same directory and open the pdf file using LiveCycle designer you should see what I mean. (The table with column heading 'Item List 2' shows all of the records in the xml file when I only want it to show records 5 and 6)

Some other niggling issue I have come up against is the data displays differently when I open the pdf file with Adobe Acrobat pro and then use the Forms/manage form data/import data menu to bind that xml file.  ( For some the 'Item List 2' table does not display any data)  Does anybody know why that is occurring?

Any help on this would be very much appreciated because it will help me get past a significant issue I am running into with a complex form I am trying to build for a client of mine.

Note:  I am using Adobe Acrobat Pro version 9 and the Adobe Livecycle is version 8.2.1

Thanks in advance.

Geoff.

2 Replies

Avatar

Level 6

Hi,

First solution is you can play with predicates:

val value = 4

var items= Ref(xfa.resolveNodes(concat("$record.itemsCollection.item.[itemNumber>""",value,"""]")))

after that you will have to use addInstance and assign all fields by scripting. It is hard way.

Second solution you can simply hide unneccessary rows by putting initialise script on item row:

if (this.index <4){this.presence = "hidden" }

Hope this helps.

Paul Butenko

Avatar

Former Community Member

Thanks Paul, this is something I can play around with.

Geoff.