Creating a SumIndexField
A SumIndexField is like a running total of certain fields in your table. Instead of calculating these sums manually, you can tell NAV to do it for you. Here, we'll tell you how to add a SumIndexField to your table and show you how to use it.
How to do it...
Follow the steps from the Creating a table recipe to create a table.
View the key by clicking on Keys in the View menu.
Add a key for the
Posting Date
field with aSumIndexField
value.Close the Keys window.
Save and close your table.
How it works...
This recipe, unlike a few others, is very straightforward. By adding fields to list in the SumIndexFields
column of a key, you tell the database to keep a track of the totals for those fields for every combination of filters in the key, as shown in the following screenshot:
There's more...
Why use SumIndexFields? Why not just calculate these totals manually? The answer is that it is much faster to let the database do it. We won't get into the details behind the scenes regarding...