AX2337

Using Save Type 1

Save Type 1 is the most flexible save type for saving data from an Axiom file to the database. You can use Save Type 1 in any managed Axiom file, but it is most typically used in templates/plan files and reports. Driver files typically use Save Type 3, but can optionally use Save Type 1 instead.

Save Type 1 is configured on a per sheet basis. Each sheet can have multiple save processes.

Save Type 1 does not create database tables or columns. The destination table and columns must already exist in Axiom Software. You can zero data by using Save Type 1, and you can delete rows of data, but you cannot delete columns.

NOTE: Save Type 1 cannot be used to save data to document reference tables, or to tables using the Large Table index scheme. Document reference tables can only be updated using Save Type 3. Tables using the Large Table index scheme can only be updated using an import utility or Copy Table Data.

To set up Save Type 1 for a sheet:

  1. On the Control Sheet, configure the following settings:

    • If the sheet is not already set up on the Control Sheet, enter the sheet name into one of the definition columns.
    • In the Save to Database Setup section, set Save Type 1 Enabled to On.
    • In most cases, you will want to set Zero on save enabled to On. If the table does not already have a column named SaveTagDocID to hold the save tags, you must create it.

    In some cases, you may need to use advanced save options such as defining a custom zero tag and custom zero tag column. For more information on when these advanced options may be needed, see How Save Type 1 works.

    NOTE: The save-to-database settings are protected on the Control Sheet. You must unprotect the sheet using Advanced > Protect > Worksheet before you can configure a save-to-database process.

  2. In the sheet, define the save-to-database control row and control column by placing the tag [Save2DB;TableName] in any cell. TableName is the destination table for the save-to-database process.

    This is the minimum required tag. The Save2DB tag supports additional optional parameters that may be used as needed.

  3. In the save-to-database control row, for each column of data that you want to save to the database, enter the name of the target column in the destination table. For example, ACCT or NYB1.

    The control row must contain entries for all key columns and alternate key columns in the destination table. If you are saving new records to the destination table, all validated columns must be included as well (unless those columns have valid default values set in the column properties). All entries in the control row must belong to the same table.

  4. In the save-to-database control column, for each row of data that you want to save to the database, enter the tag [Save]. For each row that you want to delete from the database, enter the keyword [Delete].
  5. If desired, set up a [SaveError] column to perform custom save validation on rows to be saved to the database. For more information, see Using custom save validation.

For more information on placing save-to-database tags in a sheet, including using advanced options such as a custom save tag or a custom zero tag, see Placing save-to-database tags in a sheet (Save Type 1).