@Functions are predefined formulas that perform specific tasks and return a value. Some @Functions do not work at all on the Web, others are restricted, and still others are particularly useful. The following sections describe each of these types of @Functions.
In Table 16.8 is a list of @Functions that could prove to be quite useful in Web applications.
@Function | Description |
---|---|
@ClientType | Retrieves client information to allow designers to make decisions based on client. Returns:
|
@BrowserInfo(property) | Retrieves browser information to allow designers to make decisions based on browser type. @BrowserInfo cannot be used in view selection and view column formulas. The syntax is @BrowserInfo(“property”) Properties associated with @BrowserInfo are described in Table 16.9, “@BrowserInfo Properties,” following this table. |
@URLOpen(urlstring) | Retrieves Web site specified in the URL. The following code opens LDD: @URLOpen(http://www.lotus.com/ldd) |
@WebDbName | Retrieves the name of the current database in URL format. It replaces a backslash with a forward slash and a space with a %20(hexadecimal 20). @WebDbName is new to ND6 and replaces an equivalent formula that would need a combination of @DbName, @Subset, and @ReplaceString. |
@GetHTTPHeader(“requestHeader”) | Returns the value of an HTTP request-header field, suchas “From,” “Host,” or “User-Agent.” @GetHTTPHeader(“Host”) |
@SetHTTPHeader (“responseHeader”;value) | Sets the value of an HTTP response-header field, such as, “Content-Encoding”, “Content-Length”, “Set-Cookie”. Value can be text, number, or date to which you want to set the field. Return value is True (1) or False (0) and the Notes client always returns False (0). @SetHTTPHeader(“Set-Cookie”; ”COOKIE1=4646”) |
@UrlQueryString(parameterName) | Returns the URL command and parameters, or just the value of one parameter.
http://www.your.com/dbname.nsf?OpenForm&ID=995764&FirstName=Deborah @UrlQueryString The preceding URL returns the list:
@UrlQueryString(FirstName) Returns the text: Deborah Notes clients always return null with this function. |
@DbCommand(“Domino”;parameter) | When used with “Domino” as the first parameter, creates links to Previous or Next page.
@DbCommand(“Domino”;”ViewNextPage”) @DbCommand(“Domino”;”ViewPreviousPage”) This is the only syntax where @DbCommand will work on the Web, and it is used for an embedded view when accessed from an action on a page or document. |
@Command([Viewcommand]) | Expands or collapses all categories in a view.
@Command([ViewExpandAll]) @Command([ViewCollapseAll]) Works on the Web if Use Applet in the Browser is checked in the View properties. |
@UrlEncode(encodingFormat;token) | Translates into a URL-safe format. Two encoding formats are
@UrlEncode(“Domino”;”Manager/By Dept”) Above code would return “Manager%2FBy%20Dept”. Don't use this function to encode an entire URL because it wouldn't link successfully. |
@UrlDecode(decodeType;token) | This function is the reverse of the preceding one: It decodes URL strings into regular text. Decode types are the same as the preceding function.
@URLDecode(“Domino”; ”Manager%2FBy%20Dept”) Above code returns “Manager/By Dept”. |
@Success and @Failure | Input validation formulas work on the Web. The message specified in the @Failure appears on a new page. HTML can be embedded in the message to provide a customized message and possibly a return link. These require a roundtrip to the server. |
Property | Browser Returns | Notes Returns |
---|---|---|
BrowserType |
| “Notes” |
Cookies | 1 (True) supports cookies 0 (False) doesn't. | 0 (False) |
DHTML | 1 (True) supports dynamic HTML; 0 (False) if not. | 0 (False) |
FileUpload | 1 (True) supports file upload; 0 (False) if not. | 0 (False) |
Frames | 1 (True) supports HTML <FRAME> tag; 0 (False) if not. | 1 (True) |
Java | 1 (True) if the browser supports Java applets; otherwise 0 (False). | 1 (True) |
JavaScript | 1 (True) if the browser supports JavaScript; otherwise 0 (False). | 1 (True) |
Iframe | 1 (True) if supports the Microsoft HTML <IFRAME> tag; 0 (False) if not. | 0 (False) |
Platform | Operating System platform of the browser:
“Win95,” “Win98,” “WinNT,” “MacOS,” “Unknown.” | “Unknown” |
Robot | 1 (True) if browser is possibly a Web robot; 0 (False) if not. | 0 (False) |
SSL | 1 (True) if supports SSL; 0 (False) if not. | |
Tables | 1 (True) if supports HTML <TABLE> tag; 0 (False) if not. | |
VBScript | 1 (True) if supports VBScript; 0 (False) if not. | |
Version | The browser version number; -1 for unrecognized browsers. | Notes client build number |
@BrowserInfo and all of its properties offer a lot of functionality to designers. Be prepared to answer questions regarding @BrowserInfo on the exam. |
Sometimes knowing what doesn't work on the Web is just as important as knowing what does work. Exam 612 will test your knowledge of both. Table 16.10 lists the @Functions that do not work (or work only with exceptions) on the Web.
@Certificate | @Unique | @DDEExecute | @DDEInitiate@DDEPoke |
@DDETerminate | @DocMark | @DeleteDocument | @DocChildren |
@DocDescendants | @DocLevel | @DocNumber | @DocParentNumber |
@DocSiblings | @IsCategory | @IsExpandable | @Responses |
@DialogBox | @PickList | @Prompt | @IsModalHelp |
@GetPortsList | @Environment; @SetEnvironment; ENVIRONMENT keyword (use CGI environment variables) | @IsDocBeingMailed | @MailEncryptSendPreference |
@MailSend | @Domain | @MailDbName | @MailEncryptSavedPreference |
@URLGetHeader | @MailSavePreference | @MailSignPreference | @Platform returns user's platform only |
@URLHistory | @UserPrivileges | @IsAgentEnabled |
3.148.106.149