REFERENCE


Add command
Use in a Server.Load script to create new documents in a database according to the value of a. Each new document consists of: an author field with the current user's name; a recipient's field with the current user's name; the ordinal number of the document as a summary item; the subject (summary) text item; the optional attachment item; and the body (non-summary) text item.

If no number is specified, one note is created. If b is not specified, the length of the summary data is a uniform random number between 1 and 100 bytes. If c is not specified, the length of the non-summary data is a uniform random number between 100 and 300 bytes.

Syntax

Add(a, b, c)

Where:


Example 1

This example adds documents to the default view All Document $all.


Note You need to add a value for the environment variable "a" in the NOTES.INI file, or you can code it into the script, as below:

changeto [mailserver]!!mail\mail[#].nsf mail60.ntf -keepopen

* Hard coded with value of 10 documents

add 10

drop

Example 2

This example adds documents to the Inbox folder using -f (foldername).

changeto [mailserver]!!mail\mail[#].nsf mail46.ntf -keepopen

add [a] -f $Inbox

drop

Example 3

This example adds 1 document to the Inbox view with the subject (Length of summary item) set to 30 bytes and the Body (Length of non-summary item) is set to 10000 bytes.

changeto [mailserver]!!mail\mail[#].nsf mail46.ntf -keepopen

add 1 30 10000 -f $inbox

drop

Related topics