PROGRAMMING DOMINO FOR WEB APPLICATIONS


@Functions on the Web
Several @functions are particularly useful in Web applications. However, some @functions are restricted.
Getting client information

The @ClientType function returns "Web" from a browser, "Notes" from a Notes client, and "None" from an agent. Here's an example of a computed text formula:


The @BrowserInfo function returns information about a browser depending on the parameter value. The following example gets the browser type and platform if the user is running from a browser:
Opening a URL

The @URLOpen function opens the Web page specified by a URL. This example opens lotus.com:


In Web applications, you must specify the parameter. You cannot bring up the URL Open dialog box.

Getting the database name

The following formula gets the name of the current database and adjusts it for use in a URL:


@WebDbName substitutes a forward slash for a back slash, and "%20" (hexadecimal 20) for a space. It is equivalent to:
Note @WebDbName is new with Release 6. Earlier releases require the formula with @DbName, @Subset, and @ReplaceSubstring.

Getting and setting request-header fields

The @GetHTTPHeader function returns the value of an HTTP request-header field. This example returns the value of the Host field:


The @SetHTTPHeader function sets the value of an HTTP request-header field. This example sets the value of the Set-Cookie field:
Note These @functions are new with Release 6.

Getting the URL command

The following formula returns in a text list the URL command responsible for the current page and any parameters:


To get only the value of a parameter, specify the parameter name, for example:
Note This @function is new with Release 6.

Manipulating the URL format

@URLDecode and @URLEncode format any special characters in the URL, such as spaces or punctuation, so that the URL can be displayed as readable text or passed to a computer.

The following formula would return the readable text string "http://www.acme.com/4Q profit&loss":


To return an encoded URL that can be used as an address, do not encode an entire URL, as that will remove necessary punctuation. Instead, encode only the final information, for example:
Note This @function is new with Release 6.

Field validation

@Success and @Failure work in field input validation formulas on the Web. The @Failure path causes the message specified as the parameter to appear on a new page. In the following validation formula, if the user fails to enter a value for RequiredField, the word "Gong" in bold appears on a new page:


You can make the failure page more meaningful by using more extensive HTML in the error message:
Linking to the next and previous pages

In a Web view, @DbCommand with "Domino" as the first parameter pages down and up:


Note When called from an action on a page or document in a Web application, @DbCommand acts on an embedded view in the same page or document.

Restricted @functions

The following @functions do not work or are restricted on the Web.
@FunctionWeb restriction
@CertificateDoes not work on Web.
@DbColumn(ODBC)Only works if the remote server is on the same machine as the Domino server.
@DbCommandOn Web only @DbCommand("Domino") is permitted.
@DbLookup(ODBC)Only works if the remote server is on the same machine as the Domino server.
@DDEExecuteDoes not work on Web.
@DDEInitiateDoes not work on Web.
@DDEPokeDoes not work on Web.
@DDETerminateDoes not work on Web.
@DeleteDocumentDoes not work on Web.
@DialogBoxDoes not work on Web.
@DocChildrenOn Web only works in column formulas.
@DocDescendantsOn Web only works in column formulas.
@DocLevelDoes not work on Web.
@DocLockDoes not work on Web.
@DocMarkDoes not work on Web.
@DocNumberOn Web only works in column formulas.
@DocParentNumberOn Web only works in column formulas.
@DocSiblingsOn Web only works in column formulas.
@DomainDoes not work on Web.
@EditECLDoes not work on Web.
@EditUserECLDoes not work on Web.
@EnvironmentDoes not work on Web. (Use CGI variables instead.)
ENVIRONMENTDoes not work on Web. (Use CGI variables instead.)
@FontListDoes not work on Web.
@GetFocusTableDoes not work on Web.
@GetIMContactListGroupNamesDoes not work on Web.
@GetPortsListDoes not work on Web.
@HardDeleteDocumentDoes not work on Web.
@IsAgentEnabledDoes not work on Web.
@IsDocBeingMailedDoes not work on Web.
@IsEmbeddedInsideWCTDoes not work on Web.
@IsModalHelpDoes not work on Web.
@LaunchAppDoes not work on Web.
@MailDbNameDoes not work on Web.
@MailEncryptSavedPreferenceDoes not work on Web.
@MailEncryptSentPreferenceDoes not work on Web.
@MailSavePreferenceDoes not work on Web.
@MailSend[Encrypt] and [Sign] do not work on Web.
@MailSignPreferenceDoes not work on Web.
@PickListDoes not work on Web.
@PlatformOn Web returns only the platform.
@PromptDoes not work on Web.
@RefreshECLDoes not work on Web.
@ResponsesDoes not work on Web.
@SetEnvironmentDoes not work on Web.
@StatusBarDoes not work on Web.
@TemplateVersionDoes not work on Web.
@UpdateFormulaContextDoes not work on Web.
@URLGetHeaderDoes not work on Web.
@URLHistoryDoes not work on Web.
@UserPrivilegesDoes not work on Web.
@ViewShowThisUnreadDoes not work on Web.