Question: Is it possible to show field totals of a dynamic list on a form, like we can for value tables or tabular sections?
Answer: While dynamic lists are not meant to show totals for it’s fields (columns), it is possible to unload the data from a dynamic list to a value table so that the column totals can be obtained from the value table afterwards. Here is how to write the code:
And here is the value table we get:
Please keep in mind that,
-The value table we receive includes all the data of the dynamic list with the current dynamic list filter settings which the user might have applied.
-The value table we receive do not only include the rows of the dynamic list that are currently being shown on the monitor, it includes all the rows satisfying the current dynamic list filter settings, with no relation to whether the monitor resolution is large enough to display all of the rows simultaneously or not.
-When the user changes the dynamic list filters interactively, the platform does not recognize this as an event, so it is not possible to automatically update the value table we receive when the dynamic list filters have been changed by the user. That’s why the user must be provided with a button (command) on the form, so that the user can manually update the received value table after he/she has changed the filtering of the dynamic list interactively.
-When we are dealing with catalogs using hierarchy, both the elements and the groups are included in the value table we receive.
-When we are dealing with documents, no groups are included in the value table we receive, because the documents do not use hierarchy.
-Dynamic list as a form item has a property called “Footer”. When this property is set to True, the form item will display a footer, to where the totals could be written via programming.