Delete Current Record Action

image\Action_Database_Delete_Record.jpg

The Delete Current Record action will delete the current record displayed in a query’sSelect List and remove it from the Database – the next record from the Select List will be opened. For example, if the Select List contains 10 records and the fifth record is currently open, this action will delete the fifth record from the database and open the next record in the Select List – the list will now only contain nine records.

Important Note!

This action will only work if the Select data for Updating/Deleting option in the SQL Wizard was ticked for the query selected in option 2 below – see Creating a Query – The SQL Wizard for more information.

Setting up the Delete Current Record action:

1. Add the Delete Current Record action to your trigger, as described in adding actions. The Delete Current Record tab will automatically appear when you add the action.

2. Click on the down arrow to the right of the Query box to open a list of query’s you have previously created in this publication.

Note:
If the drop down box is empty, you have not previously entered a Database Query action to this publication. You must have created at least one Database Query action in order for this action to work.

3. Click on the Apply button to save your changes.

Note:
This action will NOT ask for confirmation before it deletes the record. To ensure a record is not accidentally deleted from a database, we recommend that you create an If or Loop action that requires a user response of Yes or No before using the Delete Current Record Action.

Related Topics:

Working with Databases - Overview

Introducing the Database Actions

Showing Records from a Database in Opus

Choosing an Action