# (PRO) Pre and Post Operation Expressions

If you have a Professional Edition license, Inaportgives you the ability to execute expressions before and/or after a table operation.

This means that, for example, you can update a record in the source database to indicate that it has been successfully written to the target database.

## Pre Operation Expressions

If you provide an expression for the Pre Operation, it will be performed:

- after the match has been done on the table, but
- before the create/update/delete operation is performed.

This means that you have access to the primary key of the record that will be modified using the pk() function.

NOTE: if the operation is a create, the primary key will not be available because the target record has not been created yet.

## Post Operation Expressions

Post Operation Expressions are performed after the create/update/delete operation has been done.

Again, you have access to the primary key of the record that has been modified, using the pk() function. Because the record has now been created, the pk() function will return the primary key of the new record.

Using the Post Operation Expression allows you to update the source database with the results of the table operation. Potentially, this allows you to cache primary keys from the target database in the source - these can then be used for ongoing synchronization operations.

### Test Expression

The Test Expression column allows you to guard the evaluation column. If the test expression is TRUE, the Evaluation Expression is performed.

Useful functions for the test expression include isnomatch(), issinglematch(), and ismultiplematch()

### See Also

pk() and parentpk(), issinglematch(), ismultiplematch(), matchresult()