AX1365

Managing column sequences using Save Type 4

Using Save Type 4, you can create, edit, or delete column sequences by using save-to-database within a spreadsheet, instead of using the Edit Table dialog.

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 properties.
  • Row tags in the save-to-database control column, to determine the sequence rows in the spreadsheet to save or delete.
Save-to-database tag summary
Tag Type Tag Syntax

Primary tag

[SaveStructure2DB;Axiom.ColumnSequences;CustomSaveTag=Name]

Row tags

[Save]

[Delete]

Column tags

TableName

SequenceID

SequenceName

StartPeriod

RateSequenceID

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.ColumnSequences]

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.ColumnSequences;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 column sequence properties in the control row

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

Column Tag Description

TableName

The name of the table for the sequence.

SequenceID

The ID of the sequence.

SequenceName

The name of the sequence.

StartPeriod

The starting period of the sequence.

RateSequenceID

The ID of the corresponding mapped sequence for data conversion. Should only be used if you need to set up data conversion for the table that the sequence belongs to. If you want to clear an existing value, set RateSequenceID to 0 instead of making it blank.

This property applies to the sequence on the table where data conversion is being configured, and should be set to the ID of the corresponding sequence on the data conversion table.

The column tags can be placed to either the right or the left of the SaveStructure2DB tag. TableName and SequenceName are required. If StartPeriod is omitted when creating a new sequence, the default value is 1.

SequenceID should only be included if you want to edit the name of an existing sequence; in this case the ID must be used to identify the existing sequence to update. Note that the sequence ID changes when the sequence name is changed or when the table is saved, so all other saves to Axiom.ColumnSequences or Axiom.ColumnSequenceItems should use SequenceName instead of SequenceID to identify the sequence.

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, mark each row that you want to be processed with the appropriate row tag:

Row Tag Description

[Save]

Creates or updates the column sequence with the properties specified in the spreadsheet.

NOTE: 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.ColumnSequences; CustomSaveTag=MySave] then you would place the tag [MySave] in the rows that you wanted to be saved.

[Delete]

Deletes the column sequence, including any associated column sequence items.

When the save-to-database occurs, delete actions are processed first, followed by save actions.

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.