Creating a SumIndex field
A SumIndex 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 SumIndex field to your table and show you how to use it.
How to do it...
Follow the steps from Creating a Table recipe to create a table.
View the keys for the table by clicking View | Keys from the Menu.
Add a key for the Posting Date and a SumIndexFields for 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.
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 SumIndexFields, but will...