You are on page 1of 5

@command

Most of the standard menu commands can be executed using @Command. In addition, a number of specialized commands are
available.

@Command( [ command ] ; parameters )

This function does not work in column, selection, hide-when, section editor, window title, field, or form formulas, or in agents
that run on a server. It's intended for use in toolbar button, hotspot, and action formulas.

Always execute after all the functions present in a formula are executed, which means that the action performed by a
command cannot be used by a function that follows it in a formula.

Evaluated after all Evaluated Function


@functions immediately
EditClear Clear • Performs the menu command Edit Delete.
• 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
• In Web applications, only use this command on a form to delete the
entire current document.
EditProfile EditProfileDocumen Creates a new or opens an existing profile document in Edit mode.
t This function does not work in Web applications
FileCloseWindow CloseWindow Closes the current Notes window. If the document or design element in that
window has not been saved, Notes prompts the user to save it before
closing.
FileDatabaseDelete DatabaseDelete Permanently deletes the current database file from the hard disk where it is
stored.
FileExit ExitNotes Performs the menu command File Exit (File Quit on the Macintosh), which
closes Notes/Domino and all its open windows.
Folder FolderDocuments Moves or copies the selected document to a folder.
@Command( [FolderDocuments] ; folderName ; moveOrCopy )
NavigateNext NavNext Navigates to the next document in the current view or folder.
For Web applications, use this command only for forms.
NavigateNextMain NavNextMain Navigates to the next main document in the current view.

NavigateNextSelected NavNextSelected Navigates to the next selected document in the current view or folder.

NavigateNextUnread NavNextUnread Navigates to the next unread document in the current view or folder.

NavigatePrev NavPrev

NavigatePrevMain NavPrevMain

NavigatePrevSelected NavPrevSelected

NavigatePrevUnread NavPrevUnread

ReloadWindow RefreshWindow Reloads or refreshes the contents of the current window.

ToolsRunBackgroundMa RunScheduledAgen Runs all of the database's scheduled agents, regardless of when they are
cros ts scheduled to run. The agents will then run as usual at their regularly
scheduled times.
ToolsRunMacro RunAgent Executes a specified agent.

ViewChange SwitchView Switches to the specified view or folder within the current database or, if a
view or folder is not specified, displays the View menu so the user can select
a view.
ViewSwitchForm SwitchForm Changes the form used to display the current document.

@PostedCommand
In a formula, any command invoked using @PostedCommand executes after the rest of the formula has been evaluated.

@PostedCommand( [ command ] ; parameters )

@functions
@functions are builtin formulas that perform specialized calculations and return a value

@function-name(argument1; argument2; ... argumentn);


An @function consists of the name of the @function followed by arguments, if any. The first character of the name of an
@function is always @
CGI Variable
The Common Gateway Interface (CGI) is a standard protocol for interfacing external application software with an information
server, commonly a web server.

From the Web server's point of view, certain locators, e.g. http://www.example.com/wiki.cgi, are defined as corresponding to a
program to execute via CGI. When a request for the URL is received, the corresponding program is executed.

Data is passed into the program using environment variables. This is in contrast to typical execution, where Command-line
arguments are used. In the case of HTTP PUT or POSTs, the user-submitted data is provided to the program via the standard
input.[1]

Web servers often have a cgi-bin directory at the base of the directory tree to hold executable files called with CGI.

The program returns the result to the web server in the form of standard output, prefixed by a header and a blank line.

Example: user name, browser, IP address

@DbLookup
@DbLookup looks up a specified value in the first sorted column of a specified view in a specified database. For each
document that matches the search value, @DbLookup returns the value of a specified field on the document or column in the
view.

@DbLookup( class : cache ; server : database ; view ; key ; fieldName ; keywords ) or

@DbLookup( class : cache ; server : database ; view ; key ; columnNumber ; keywords)

@DbColumn
@DbColumn returns all the values in a specified column in a specified view in a specified database.

@DbColumn( class : cache ; server : database ; view ; columnNumber )

Validation
LotusScript you can put validations

1) InputValidation

2) Field Exiting event

3) QuerySave

4) JavaScript onBlur or onSubmit

JS Header ( JS Header on the Objects tab.)


Use JS Header to enter JavaScript directly into the page header

The Programmer's pane provides a placeholder called JS Header on the Objects tab that allows you to write JavaScript in the
header of a page, form, or subform. JavaScript written in the header in this way does not require a formula to return a
JavaScript function, or text to be marked as passthru HTML.

can write JavaScript function.

HTML Head Content


The HTML Head Content event on a page or form lets you pass HTML information, such as a Meta tag, to the <Head> tag for a
document.
We can add Java script “script libraries “here.
Readers and Authors fields
To restrict who can read documents, add a Readers field to a form.

Any users who have Editor (or higher) access to the database can read and edit a document if one of the following is true:
• They are listed in the form's Read access list or Readers field.

• The form has no Read access list restrictions or no Readers field.

Users who have been assigned "No Access" to a database in the ACL can never read a document, even if you list them in a
Readers field.

On the other hand, users with Editor access or above in the ACL can be restricted from reading documents if they aren't
included in a Readers field.

To restrict who can edit a document, add an create, add an Authors field to a form, which allows only users who have Author
access in the ACL to edit the documents they create.

An Authors field works in conjunction with Author access in the database ACL. If you assign users Author access in the ACL,
they can read documents in the database but cannot edit their own documents.
If you list those users in an Authors field, they can edit documents in the database.

Entries in an Authors field cannot override the database ACL; they can only refine it.

Users who have been assigned No Access in an ACL can never edit a document, even if you list them in an Authors field.

Users who already have Editor (or higher) access in the ACL are not affected by an Authors field. Authors fields affect only
users who have Author access in the ACL.

Roles
A role defines a set of users and/or servers.

you can use it in database design elements or functions to restrict access to those elements or functions.

ACL ACL control that tasks users can perform in the database.
Access level Allows users to Assign to
Manager Modify the database ACL. Two people who are responsible for the
Encrypt the database. database.
Modify replication settings.
Delete the database.
Perform all tasks allowed by lower access levels.
Designer Modify all database design elements. A database designer and/or the person
Create a full-text search index. responsible for design updates.
Perform all tasks allowed by lower access levels.
Editor Create documents. Any user allowed to create and edit documents
Edit all documents, including those created by others. in a database.
Read all documents unless there is a Readers field in the
form. If there is a Readers field, the Editor must be listed to
be able to read or edit the document.
Author Create documents if the user or server also has the Create Users who contribute documents to a
documents access level privilege. When you assign Author database.
access to a user or server, you must also specify the Create
documents access level privilege.
Edit the documents where there is an Authors field in the
document and the user is specified in the Authors field.
Read all documents unless there is a Readers field in the
form. If there is a Readers field, the Author must be listed to
be able to read documents.
Reader Read documents where there is a Readers field in the form Users who only need to read documents in a
and the user name is specified in the field. database but not create or edit documents.
Depositor Create documents. Users who contribute documents but who do
not need to read or edit their own or other
users' documents. For example, use Depositor
access for a ballot box application.
No Access Have no access, with the exception of options to "Read Terminated users, users who do not need
public documents" and "Write public documents." These are access to the database, or users who have
privileges that designers may choose to grant. access on a special basis.

Note You may want to specifically assign No


Access to individuals who should not have
access to a database, but who may be
members of a group that does.
Default entries
Pre-defined for user entering through client not have any assigned access on the database

Anonymous entries
Pre-defined for user entering through web don’t have any any assigned access

Incorporate ODBC
‘Uselsx “*LSXODBC” (loads an LS extension file containing public definitions)

Incorporate script library into an object


Use statement in Options Public event of Global

pass and retrieve variable using URL (location.href)


approaches may differ, including CGI Query_String field, JS parsing, formula parsing, etc. — look for “&” designation

How to write a Java script code in a Lotus script agent?


Inside Print “”

$$View Template and $$ViewTemplateDefault


Form name Design element required and description
$$ViewTemplate for viewname Embedded view or $$ViewBody field. Associates the form with a specific view. The
form name includes viewname, which is the alias for the view or when no alias exists,
the name of the view.
$$ViewTemplateDefault Embedded view or $$ViewBody field.
Makes this form the template for all Web views that aren't associated with another
form.
Pass-thru HTML
HTML text can be embedded in a notes rich text item by setting this property and then calling append text method.

Render pass-thru HTML


When clicked the text is parsed as HTML code.

Generate HTML for all fields


"Generate HTML for all fields" to generate HTML information about hidden fields on a form. This allows documents in a Web
application to work like documents in a Notes application

WebQueryOpen events
A WebQueryOpen event runs the agent before Domino converts a document to HTML and sends it to the browser. Domino
ignores any output produced by the agent in this context.

WebQuerySave events
A WebQuerySave event runs the agent after field input validation formulas are run and before the document is actually saved
to disk or mailed. The agent can modify the document or use the document data to perform other operations. The document is
automatically saved after the agent runs. Do NOT have the agent explicitly save the document (for example, by calling
NotesDocument.Save) because an explicit save could cause incorrect results.

A WebQuerySave agent can produce output to be sent back to the user. For example in a LotusScript agent, you can use the
Print command to return raw HTML. If the agent produces output, then the form should not have a $$Return field because
Domino will return only the agent output and ignore the field.

You might also like