Delete All Records

Deletes all the records in the current found set.

Options 

With dialog specifies whether to display a dialog box when the script step is performed, asking users to confirm deletion of all records.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go Yes
FileMaker WebDirect Yes
FileMaker Server Partial
FileMaker Cloud Partial
FileMaker Data API Partial
Custom Web Publishing Partial

Originated in version 

6.0 or earlier

Description 

Important  You cannot undo deleting records.

Delete All Records attempts to lock a group of records in the found set before deleting them. If it can lock all records in the group, this script step deletes the group of records, attempts to lock the next group of records, and so on. The first time it can’t lock all records in a group (for example, if a record is being edited by another user), Delete All Records stops and returns an error code (which can be captured with the Get(LastError) function).

Notes 

Example 1 

Asks if the user wants to delete all records in the current table.

Copy
Show All Records
Delete All Records [With dialog: On]

Example 2 

Asks if the user wants to delete all records in the current found set.

Copy
Show Custom Dialog ["Do you want to delete all " & Get ( FoundCount ) & " records found?"]
If [Get ( LastMessageChoice ) = 1]
    Delete All Records [With dialog: Off]
End If