Possible to fill 2 different table dependent on the data input
Hi community,
is it possible in Adobe Lifecycle Designer to fill two different tabels based on the data input?
I'm creating a form in Adobe Lifecycle Designer with data binding for usage in our CRM System. This form should show 2 tables. The tables are dynamically growing dependent on the data. In each column is a data binding to the respective field maintained. Also a relative data binding in the growing row is defined that the data is shown in regard to the Item ID. My scenario is that I want to display the data in two different tables dependent on the data input of the product field. So one table for Product A and another one for product B.
Table Product A
| ITEM ID | PRODUCT | TECHNICIAN | CUSTOM1 | CUSTOM2 | CUSTOM3 |
|---|---|---|---|---|---|
| 10 | PRODUCT A | PERSON 1 | TEST | TEST | TEST |
| 20 | PRODUCT A | PERSON 2 | TEST | TEST | TEST |
Table Product B
| ITEM ID | PRODUCT | TECHNICIAN | CUSTOM1 | CUSTOM2 |
|---|---|---|---|---|
| 30 | PRODUCT B | PERSON 1 | TEST | TEST |
| 40 | PRODUCT B | PERSON 2 | TEST | TEST |
The data binding looks like this:
- data binding of the DataRow (growing row in the table): $.ServiceRequest.Item[*]
- data binding of the Item ID: $.ServiceRequest.Item[*].ID
- data binding of the Product: $.ServiceRequest.Item[*].Description
I tried to use the following scripting in the data row of the validate/initialize event:
- for table Product A: -->address the procdut data via the SOM name and request the condition ever item equals Product A, should be displayed.
if (FormServiceRequestConfirmation.Page2.frmKilometer.TableKilometer.DataRow.txtProduct.rawValue == "Product A")
then
this.rawValue = xfa.record.ServiceRequest.Item[*].Description.value;
endif
- for table Product B
if (FormServiceRequestConfirmation.Page2.frmKilometer.TableKilometer.DataRow.txtProduct.rawValue == "Product B")
then
this.rawValue = xfa.record.ServiceRequest.Item[*].Description.value;
endif
Currently, it's not working. The first table shows all items and the second none. I also tried to hide the items in table Product A that belong to table B with (this.presence = "hidden";), but then the data belonging to product B isn't in the second table...
What's wrong in my script? How does it has to look like? - Can you help me Bruce BR001? I highly appreciate your inputs ![]()
Thanks very much for help and best regards,
Deborah