on ‎2020 Jan 06 8:13 AM
Hi guys,
I got an Adobe form requirement where the item data part is split into two boxes/sections like shown below (I just simplified the boxes but each box has multiple fields):

For each item, there are two sections where I should display their data. Example, item1 will show details in boxes "Item 1-A" and "Item 1-B", item2 for "Item 2-A" and "Item 2-B" and so on. Currently, the boxes "Item 1-A", "Item 2-A" and "Item 3-A" are in one content area and there's no problem with it. The "B" boxes are the ones I can't properly display data in the form. I tried several scripts and layouts in the content area but I can't still make it.
May I ask for your inputs how to do this? I can provide more details if needed. Thank you!
Regards,
Leo
Request clarification before answering.
Hi Leo,
you are experiencing the exhausted databinding mechanism in adobe livecycle.
The problem is, your data might look something like this:
list
item
A
B
item
A
B
You might have defined two subforms / tables, that each bind to the data path:
"$.list.item[*]"
In this case, the first table binds to the data and "exhausts" the data binding, therefore, the second subform / table is empty.
As a workaround there are two options:
1. Remodel your data service (recommended)
If possible remodel your data service, so it looks like this:
list
item
A
item
A
list2
item
B
item
BNow you can bind one subform / table to: $.list and the other to $.list2 and they should not collide with each other.
2. Use Javascripting, to directly set the second table fields.
You can use the following snippets and modify it to fit your data:
// Insert Script in the table
var items = xfa.resolveNodes("xfa.datasets.data.list.item[*]") // get all item nodes
for (i = 0; i < items.length; i++) {
// Get the current user from list
var item = items.item(i);
// Create a new table row
this._row.addInstance(true); // I assume your subform that bind the items is called "row", otherwise you need to change this
// Get the XFA-Object of newly created row via last_index
var row = this.resolveNode("row[" + i+ "]"); //get latest row
// Set the data of the Name field of the new row
row.Name.rawValue = item.B.value; //set the data directly to the field
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.