On this page
AX2338
How Save Type 1 updates data in the database
This topic describes the basic update behavior for Save Type 1. Advanced options may be used to adjust this behavior as needed.
Each Axiom file has a unique document ID. The first time a save-to-database is performed for a file, Axiom Software generates a zero tag based on the document ID. For each record of data saved to the destination table, this tag is placed in the SaveTagDocID column. The SaveTagDocID column must be manually created in the destination tableāit is not system-generated.
When subsequent data saves are performed for that file, Axiom Software does the following:
-
Compares the records to be saved from the source sheet to the existing records in the destination table that are flagged with the matching zero tag in the SaveTagDocID column. If a record exists in the table but not in the sheet data, then the following columns are zeroed for that record:
- The columns listed in the save-to-database control row (except for key columns, alternate key columns, and validated columnsColumns that have been assigned a lookup column. The lookup column contains the set of allowed values for the validated column.)
- The SaveTagDocID column
- Saves the sheet data to the database. For each record that was updated or inserted, the save tag is placed in the SaveTagDocID field.
- Deletes records that are flagged to be deleted.
The zero process is intended to ensure that no old data is retained in the database from prior saves. In certain cases you may want to disable the zero process (so that no zeroing occurs on save), or modify it to use custom zero tags (so that each save process is tracked independently).
If multiple rows of data in the sheet share the same combination of key codes, then by default all non-key and non-validated fields in those rows are aggregated when saved to the database. This default behavior only applies when saving to data tables (aggregation never occurs when saving to reference tables), and can be disabled if desired by using a parameter in the Save2db tag.
Updating a record using multiple save processes
The default zero behavior assumes that data for each unique table record is saved from one save process in one file only. If you save data to a record from multiple files (or multiple save processes in the same file), then each subsequent save process will overwrite the zero tag from the prior process. To enable saving to the same records from multiple save processes, you must define a custom zero tag and custom zero column for each additional save process that has the same target records (advanced settings ZeroTag Value and Custom ZeroTag Column).
For example, you may have a plan file for Dept 200, which saves data to Acct 10000. And you may have a report allocation "utility" which also saves data back to Dept 200 / Acct 10000. If both of these files use the default zero behavior, then when the allocation utility is run, its zero tag will overwrite the zero tag from the plan file. However, if both save processes use a different custom zero tag and column, then one process will not overwrite the zero tag for the other process.
Custom zero tag settings can be defined per sheet (in the Control Sheet) or per save process (in the Save2DB tag). For more information, see Using zero tags with Save Type 1.
Get more information and training resources: www.kaufmanhall.com |
Was this topic helpful? st1_how_data_is_saved.htm |
