Compose @Command (Formula Language)

Creates a new, blank document.

Syntax

@Command([Compose]; server : database ; form ; width : height )

Parameters

server : database

Text list. The name of the server and database where you want to create the document. Null for server means the local Domino® or Notes® directory. Null for server and database means the current database.

form

Text. The name of the form you want to use when creating the new document.

width : height

Number list. Optional. The width and height, in inches, of the window for the document you compose.If you omit this parameter, or use zero for either value, you create the window at the default size (usually the size that the last user set).

Note: The width/height parameter has no effect in Release 5 and later.

Usage

To use this command in Web applications, use the following syntax:

@Command([Compose]; form)

When you compose a response document, make sure a database is open and a document is already selected at the view level. See ComposeWithReference for composing response documents with references to the main document.

Whenthe command is used to compose main documents, the target database does not have to be open. This command adds a database icon to the workspace.

If the command is used in a view action, the form formula of the view will override the form specified in the @command. To avoid this problem add the following line to the form formula of the view:

@If(@IsNewDoc; @Return(Form); "")

The width/height parameter does not apply in MDI mode when the window is maximized. When restored, the window returns to the size you specify. The measurement in inches matches the ruler bar in the editor, so that you can use the ruler bar to guide you in sizing the window. When you specify the width and height, you center the window in the enclosing Notes® window (for MDI mode) or in the operating desktop (for Mac and SDI mode).

Examples

  1. The following formula composes a new MainTopic document in the current database.
    @Command([Compose]; ""; "MainTopic") 
  2. The following formula composes a new Client Information document in the REPS.NSF database in the Westchester directory of the "sales/nyoffice" server.
    @Command([Compose]; "SALES//nyoffice" : "Westchester\\REPS.NSF"; "Client Information")
  3. The following formula composes a mail memo in the user's own Mail database.
    @Command([Compose]; @MailDbName; "Memo")
  4. The following formula composes a response document based on the currently selected document, in a window four inches wide and seven inches high.
    @Command([Compose];"";"Response"; 4:7)
  5. The following code, when added to the "Next" hotspot button in form1 and triggered from the Web, saves form1 and opens form2 in edit mode.
    @Command([FileSave]);
    @Command([CloseWindow]);
    @Command([Compose];"form2")