AX2062
About data control codes for Axiom queries
By default, the insert control column or row for an Axiom query also contains the data control codes for the query. When an Axiom query inserts records into a sheet, the appropriate key codes for each record are placed into this column or row. When an Axiom query updates data in a sheet, these key codes are used to associate each record in the sheet with its corresponding record in the database, so that each row is updated with the appropriate data.
The key codes placed in the sheet correspond to the "sum by" level for the query. For example, if the sum by level is Acct.Acct, then the key codes are account codes. If the sum by level is Acct.Acct;Dept.Dept, then the key codes are the Acct and Dept codes concatenated together.
NOTE: For the purposes of data control for the Axiom query, the "key code" is whatever code corresponds to the level used for the sum by; it does not necessarily mean a code from a literal key column as specified in the table. For example, if the sum by level for the query is ACCT.Category, then the "key codes" are category names as defined in that column, such as "Revenue" or "Benefits."
It is recommended to use the default behavior where the insert control column or row also holds the data control codes. However, the Control Sheet does contain a separate setting to define an Internal Data Control Column (for vertical queries only). If this setting is blank, the default behavior applies and the insert control column is used. If the setting contains a column reference, then that column is used for the data control codes instead. The primary purpose of the separate setting is for backward compatibility when upgrading older Control Sheets—older versions of Axiom Software required these columns to be defined separately. New queries should use the default behavior unless there is a compelling reason not to.
Regardless of where the data control codes are placed, these codes should be thought of as system-managed and therefore not used as display data for the file or to control other behavior for the file. For example, if the sum by level for the query is Acct.Acct, there should always be a separate column in the field definition that brings in Acct.Acct, and this column should be used to display the account code for each record and to drive any formulas that depend on the account code. Axiom Software reserves the right to change the structure or display of the data control codes as needed to support Axiom query functionality, which could impact your file if you are relying on these codes for any purpose other than data inserts and updates for the Axiom query.
If the refresh behavior for the query is Update, then you may need to manually place the appropriate data control codes in this column. This is the case if the codes have not been placed by a previous execution of the query using Rebuild or Insert. For more information, see Manually placing data control codes for update queries.
AX2062