Audit Functions

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
ParameterDescription

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 column to update. The name is case-sensitive and can be in uppercase or lowercase depending on the type of database used.

value

The value to increase/decrease the existing value with.

key<n>

The key columns in the order as entered in the Audit Profile Editor.

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
ParameterDescription

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 column to update. The name is case-sensitive and can be in uppercase or lowercase depending on the type of database used.

value

The value to set.

key<n>

The key columns in the order as entered in the Audit Profile.

Returns

nothing.