EditClear @Command (Formula Language)

Performs the menu command Edit - Delete.

Syntax

@Command( [EditClear] )

Usage

This command executes after all @functions. Use @Command([Clear]) to execute immediately. See the "Order of evaluation for formula statements" topic for more details.

  • In a view, folder, or a document in Read mode in a Notes® application, marks the currently selected document for deletion.
  • In a document in Edit mode, deletes the highlighted data (text, tables, graphics, links, file attachments, or objects).
  • In Web applications, only use this command on a form to delete the entire current document. It cannot be used to delete highlighted data on a form in Edit mode; if executed on a form, it deletes the entire document. You cannot use this command to mark selected documents in a view for deletion. Use the MoveToTrash @Command instead. To customize the "Deleted" confirmation page returned by the server, create a form named "$$ReturnDocumentDeleted." See Customizing "Form processed" confirmation for the Web in the Application Development with Domino® Designer guide for details.
  • Using this command followed by @Command([EditGotoField]) produces an error.
  • In Notes® applications, when this command is called on a form, subform, view, or folder in Design mode, deletes the highlighted data, fields, or columns.
  • On the workspace, removes the selected icon (without permanently deleting the database from disk).
  • This command executes only after the entire formula has been evaluated regardless of whether @Command or @PostedCommand is used.
  • It is most convenient to use a toolbar button to invoke this command.

If using this command in a hotspot button or any other element that causes a change in focus, the EditGoToField or EditTop command must be used first to return the focus to the document. The document must be in Edit mode.

Examples

  1. The following example, when used in the DeleteField action of a form in a Notes® application, deletes the content of whichever field has focus when the DeleteField action button is pressed in edit mode:
    @Command([EditGotoField]; @ThisName);
    @Command([EditSelectAll]);
    @Command([EditClear])
  2. The following example, when used in the Delete action of a form, deletes the current document opened in read mode on the Web. It then displays a customized form, if you created a form with the name $$ReturnDocumentDeleted, or displays the default "Deleted" confirmation page.
    @Command([EditClear])
  3. The following example, when used in a view action of a Notes® application, deletes the documents selected in the view.
    @Command([EditClear)]