I need an urgent help here.
The requirement is to sort the content of the table to be printed and then we need to add sub-total row after a set of items end.
So something like this.
|Document #||Item #||Amount|
Now, in the 1st script I have written a logic to loop on the table
- Compare current and next entry. Swap if 1st>2nd. (I am just replacing the content of rows at index 1 and 2)
- Now I get a sorted table.
- On the sorted table I have written script to add amount field but I found that in the second loop (it is iterating on unsorted data)
which means that content was not bounded to node, it just changed at runtime. Although getting printed in the sorted manner.
Please help on this issue.