Audit Functions

Audit Functions

For the audit related functions to take effect, you must select the Enable Audit option in the Audit tab in the Workflow Properties dialog, see Audit Tab.

Note!

 The key or combination of keys are only unique within a batch. If a second batch is executed, a new row looking exactly the same as one from the previous batch might be received. The purpose of the key is to be able to save more than one row per batch.

For further information about Audit, see Audit Profile in the Desktop User's Guide.

The following functions for Audit described here are:

AuditAdd

The auditAdd function increases or decreases a column value in any table specified. Note that the table must be configured in the Audit Profile Editor window first, and the column must be defined as a 'Counter'.

void auditAdd ( string profile, string tableAlias, string columnAlias, any value, any key1, //Optional any key2 ) //Optional

Parameter

Description

Parameter

Description

profile

The name of a defined Audit Profile. This declaration is case-sensitive.

The profile declaration must include the directory name: myFolder.myProfile

tableAlias

Name of the table to update. It is case-sensitive and can be in uppercase or lowercase depending on the type of database used. It must also exist in the specified Audit Profile.

columnAlias

Name of the table column to update. The name is case-sensitive and can be in uppercase or lowercase depending on the type of database used.

The columnAlias being updated must be a non-key column.

value

The value to increase/decrease the existing value with.

key<n>

Key values are written into the key columns of the new row (and later used to identify that row for updates).

Pass one value for each table column marked as Key in the Audit Profile, in Key Sequence order (1, 2, ...).

Returns

Nothing.

AuditSet

The auditSet function sets a column value in any table specified. Note that the table must be configured in the Audit Profile window first, and the column must be defined as being of type 'Value'.

void auditSet ( string profile, string tableAlias, string columnAlias, any value, any key1, //Optional any key2 ) //Optional

Parameter

Description

Parameter

Description

profile

The name of a defined Audit Profile. This declaration is case-sensitive.

The profile declaration must include the directory name: myFolder.myProfile

tableAlias

Name of the table to update. It is case-sensitive and can be in uppercase or lowercase depending on the type of database used. It must also exist in the specified Audit Profile.

columnAlias

Name of the table column to update. The name is case-sensitive and can be in uppercase or lowercase depending on the type of database used.

The columnAlias being updated must be a non-key column.

value

The value to set.

key<n>

Key values identify the existing row to update.
Pass one value for each table column marked as Key in the Audit Profile, in Key Sequence order (1, 2, ...).

Returns

nothing.