Hi;
I am relatively new to LiveCycle but have a solid knowledge of JavaScript. We have an requirement where we need to display the same data using in different tables using different grouping. The challenge is that I cannot bind the same data twice in LiveCyle. Before spending too much going down an avenue that does not lead anywhere I like to validate my train of thought.
Assuming the the data xml looks something like
<TimeEntries>
<Entry>
<ServiceDate>1/2/2018</ServiceDate>
<ServicePerformer>Tim Smith</Service Performer>
<Hours>8</Hours>
<Price>800</Price>
<Role>Senior Consultant</Role>
</Entry>
<Entry>
<ServiceDate>2/2/2018</ServiceDate>
<ServicePerformer>Tim Smith</Service Performer>
<Hours>8</Hours>
<Price>800</Price>
<Role>Senior Consultant</Role>
</Entry>
<Entry>
<ServiceDate>8/2/2018</ServiceDate>
<ServicePerformer>Tim Smith</Service Performer>
<Hours>8</Hours>
<Price>800</Price>
<Role>Senior Consultant</Role>
</Entry>
<Entry>
<ServiceDate>8/2/2018</ServiceDate>
<ServicePerformer>Henry Smith</Service Performer>
<Hours>8</Hours>
<Price>800</Price>
<Role>Senior Consultant</Role>
</Entry>
</TimeEntries>
I need one table that provides the output grouped by Week, then Consultant and the total Price. Another table needs to have grouping by Week, then Role and the total Price. There are two more different groupings.
First I would need to alter the xml Data (via script) to include the week. Second I either need to clone TimeEntries (for each of the groupings required), or create new nodes with the aggregation done already.
Third step is to then bind the new nodes to a table on the form. Does this approach make sense and is this possible to achieve with the scripting available?
I have done some testing adding nodes to the data xml. Whilst I can see the node count changing, when I save the xml (xfa.host.exportData("", 0)) it does not show the new nodes in the export.
Any feedback is much appreciated.
Thomas