AX1366

Managing column sequence items using Save Type 4

Using Save Type 4, you can create and edit column sequence items by using save-to-database within a spreadsheet, instead of using the Edit Table dialog. For each column that is assigned to a sequence, there is a corresponding sequence item that defines the properties of that column within the sequence, such as its order within the sequence.

Column sequences are managed using two different Save Type 4 processes. Axiom.ColumnSequences defines the sequence "container," such as the sequence name, table name, and ID. Axiom.ColumnSequenceItems defines the individual columns assigned to the sequence and their order.

Save Type 4 depends on the placement of save-to-database tags within the sheet. There are three components:

  • The primary SaveStructure2DB tag, which defines the locations of the save-to-database control row and control column, and specifies the desired operation.
  • Column tags in the save-to-database control row, to specify the columns which hold the sequence item properties.
  • Row tags in the save-to-database control column, to identify the sequence item rows in the spreadsheet to save.
Save-to-database tag summary
Tag Type Tag Syntax

Primary tag

[SaveStructure2DB;Axiom.ColumnSequenceItems;CustomSaveTag=Name]

Row tags

[Save]

Column tags

TableName

SequenceName

ColumnName

Period

WeightFactor

NOTES:  

  • Save Type 4 must be enabled for the sheet on the file's Control Sheet in order for the save process to occur. For more information, see Using Save Type 4.
  • The user performing the save must be an administrator or have the Administer Tables security permission.

Placing the primary save-to-database tag in the sheet

To define the save-to-database process, place the following tag in any cell in the sheet, within the first 500 rows:

[SaveStructure2DB;Axiom.ColumnSequenceItems]

The row containing this tag becomes the control row for the process, and the column containing this tag becomes the control column for the process.

You can also optionally use the custom save tag parameter. For example:

[SaveStructure2DB;Axiom.ColumnSequenceItems;CustomSaveTag=SaveSequence]

NOTES:  

  • The primary SaveStructure2DB tag must be located in the first 500 rows of the sheet.

  • The SaveStructure2DB tag can be placed within a formula, as long as the starting bracket and identifying tag are present as a whole within the formula. For more information, see Using formulas with Axiom feature tags.

Defining the sequence item properties in the control row

Within the control row for the save-to-database process, specify the columns that define the sequence item properties. You can place these properties in any column:

Column Tag Description

TableName

The name of the table for the sequence.

SequenceName

The name of the sequence.

ColumnName

The name of the table column assigned to the sequence item.

Period

The period of the sequence item, meaning its order in the sequence.

WeightFactor

The weight factor of the sequence item.

The column tags can be placed to either the right or the left of the SaveStructure2DB tag.

The following columns are always required: TableName, SequenceName, and ColumnName. When creating a new sequence item, Period is also required. If WeightFactor is omitted when creating a new sequence, the default value is 1.

The control row must be dedicated to containing only valid column names for the Save Type 4 operation to the target table. Any invalid entries in the control row will cause an error when saving.

Flagging the rows to save

Within the control column for the save-to-database process, column, mark each row that you want to be saved with a [Save] tag. This is the only valid tag for the column sequence item save.

If you have defined a custom save tag in the SaveStructure2DB tag, then you must mark the rows with that tag instead of the default tag. For example, if your primary tag is [SaveStructure2DB; Axiom.ColumnSequenceItems; CustomSaveTag=MySave] then you would place the tag [MySave] in the rows that you wanted to be saved.

Only rows that are marked with a valid tag are processed; all other rows are ignored, even if there is content in the property columns. If a row contains a valid tag but no content exists in the property columns, a save error will occur.

NOTE: The row tag can be placed within a formula if desired. For example, you might want to use a formula to determine whether a particular row should be saved or deleted.

Considerations when creating new column sequences using Save Type 4

When using Save Type 4 to create new column sequences, use one SaveStructure2DB tag to Axiom.ColumnSequences to create the sequence "container," and another SaveStructure2DB tag to Axiom.ColumnSequenceItems to create the individual columns in the sequence.

As long as the two save blocks are in the correct order—so that the column sequence is created before attempting to create the items—you can create the entire sequence within a single save-to-database process.