cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adobe Livecycle Designer Javascript for aggregating nested table rows.

former_member841790
Discoverer
1,258

Hi Experts.

I have a requirement for a client to modify a form template. The client uses S4 Public Cloud and the billing document form template is downloaded and edited in Adobe LiveCycle Designer. The standard CDS used for the invoice is FDP_V3_BD_PROF_SERV_SRV. In this invoice, there are two main tables (displayed on the layout) the first one is Time and Expense. The request is to consolidate all the duplicate items in the subsection of this table. I know this needs to be done in the script. I just do not know where to put it (eg. Initialise, form:ready, form calc ?) and then secondly because the table holding the duplicates is so nested the extremely long names and logic for this is deceiving. Please could you assist?

The table that holds the value in the standard template is called

Form.bdyMain.frmTableBlock_TE.frmTimeExpenseItems.tblTimeExpenseItems.frmJustForOuterTableBorder.tblSubTotal.secSubTotal.tblSubTotal2.secSubTotal.tblSubTotal3

This tblSubTotal3 contains the rows i need to consolidate depending on the colDescription(column) duplicate values. What would this Javascript look like and where would I need to add it?

I am adding a screen shot of this table with a duplicate value.

View Entire Topic
harishankar714
Participant
0 Likes

You can use JavaScript to consolidate the duplicate items in the table "tblSubTotal3". The JavaScript code can be added to the form's "Form Calc" event in Adobe LiveCycle Designer.

former_member841790
Discoverer
0 Likes

Thanks so much for getting back to me. But can I ask what code will I then use to determine the duplicates to consolidate this?

In ABAP we would have a var that is used to determine duplicates or just use the sort function and then within the loop find the duplicate and calculate a local variable value that is then in turn re written to the table index with the new value(as the amount field) and then the duplicate entry is just deleted. Leaving my original table with a "consolidated" Amount.

Not sure how this would look in source code for Java script