I made a dynamic pdf that has a table in it. The user can add/remove rows to the table. Table starts with a single visble row by default.
The first cell of the row is a drop down list selection, bound as "Drugtype"
The second-fifth cell of the row are numeric fields, all bound as "InvItem" They get bindings in my hierachy as InvItem[0}, InvItem[1], etc. automatically by Livecycle Designer.
To add more rows, I use a button, (in javascript,)
form1.BodyPage.FormProper.Inventory.MoreInventory::click - (JavaScript, client)
InventoryTable._InventoryEntry.addInstance(1);
To delete a row....
form1.BodyPage.FormProper.Inventory.InventoryTable.InventoryEntry.DeleteRow::click - (JavaScript, client)
_InventoryEntry.removeInstance(this.parent.index);
This works exactly as intended, except it totally screws up my .csv output
Say for example I enter 3 rows of data....
Row 1, for DrugType I select "morphine" and enter numbers 111,011,001
Row 2, for DrugType I select "fentanyl" and enter numbers 222, 022, 002
Row 3, for DrugType I select "Valium" and enter numbers 333, 033, 003
I use a third party service that accepts html input and emails me a .csv (LuxSci it is called.)
The problem is that my .csv looks like this form that form...(I am displaying this as regular text so it is easier to read and understand.)
DrugType[0] = Morphine
* DrugType[1] = Fentanyl
* DrugType[2] = Valium
* DrugType[3] = disabled
* InvItem[0] = 111
* InvItem[10] = 333
* InvItem[11] = 033
* InvItem[12] = 003
* InvItem[1] = 011
* InvItem[2] = 001
* InvItem[3] =
* InvItem[4] =
* InvItem[5] = 222
* InvItem[6] = 022
* InvItem[7] = 002
* InvItem[8] =
* InvItem[9] =
My question: How can I match up the dynamic rows so that the InvItem numbers for Morphine match up with Morphine?, etc.
How do you bind the individual table cells of a dynamic table to allow this?
I'm totally perplexed and any help would be appreciated.