$$Fields and Reserved Notes Field Names Glossary



I got this content long back from some website.. can't remember.
I found it very useful. So, here it is for your use..


$$Fields and Reserved Notes Field Names Glossary
Anonymous on 08/26/1999 at 07:51 PM

Category: Notes Developer Tips
Forms/Subforms, Formulas
$$ Fields

$$HTMLhead
If you don't use the "For Web Access: Treat document contents as HTML" form property, adding a $$HTMLHead field to a form allows you to pass HTML information, such as Meta tags and JavaScript, to the Head tag for a document. The field can be any data type, but a hidden computed-for-display text field is the best choice.
(source: Notes Help 4.6)

$$QueryOpenAgent (4.6) or the form event WebQueryOpen (4.6)
The Notes Help 4.6 says about WebQueryOpen: 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.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQueryOpen form events.
This simulates the LotusScript QueryOpen form event that isn't supported on the Web.
The $$QueryOpenAgent field works in the same way. Works also in 4.6.


$$QuerySaveAgent (4.5) or the form event WebQuerySave (4.6)
The Notes Help 4.6 says about WebQuerySave: A WebQuerySave event runs the agent before the document is actually saved to disk. The agent can modify the document or use the document data to perform other operations.
Create a shared agent that runs manually. Then write a formula that uses @Command({ToolsRunMacro}) to run the agent and attach it to the WebQuerySave form events.
This simulates the LotusScript QuerySave form event that isn't supported on the Web.
The $$QuerySaveAgent field works in the same way. Works also in 4.6.


$$Return
After Web users submit a document, Domino responds with the default confirmation "Form processed." To override the default response, add a computed text field to the form, name it $$Return, and use HTML as the computed value to create a customized confirmation.
(source: Notes Help 4.6)


$$ViewBody
Value is view name (in quotes) or a formula that computes the view name. Same as Embedded View.
(source: Notes Help 4.6)
This is the field you put in a form to display a view. See also the list of $$ forms below.


$$ViewList
Has no value. Same as Embedded Folder Pane.
(source: Notes Help 4.6)
This is the field you put in a form to display the list of available views and folders. See also the list of $$ forms below.


$$NavigatorBody, $$NavigatorBody_n
Value is navigator name (in quotes) or a formula that computes the navigator name.
Same as Embedded Navigator. To create multiple $$NavigatorBody fields on a form, append an underscore and a character to each subsequent field name.
(source: Notes Help 4.6)
This is the field you put in a form to display a navigator. See also the list of $$ forms below.




The following fields are not $$ fields, but they are reserved names in a Web context.


Table of CGI variables from the Notes Help 4.6


Domino captures the following CGI variables through a field or a LotusScript agent. You can also capture any CGI variable preceded by HTTP or HTTPS. For example, cookies are sent to the server by the browser as HTTP_Cookie.


Auth_Type
If the server supports user authentication and the script is protected, this is the protocol-specific authentication method used to validate the user.

Content_Length
The length of the content, as given by the client.

Content_Type
For queries that have attached information, such as HTTP POST and PUT, this is the content type of the data.

Gateway_Interface
The version of the CGI spec with which the server complies.

HTTP_Accept
The MIME types that the client accepts, as specified by HTTP headers.

HTTP_Referer
The URL of the page the user used to get here.

HTTPS
Indicates if SSL mode is enabled for the server.

HTTP_User_Agent
The browser that the client is using to send the request.

Path_Info
The extra path information (from the server's root HMTL directory), as given by the client. In other words, scripts can be accessed by their virtual path name, followed by extra information that is sent as PATH_INFO.

Path_Translated
The server provides a translated version of PATH_INFO, which takes the path and does any virtual-to-physical mapping to it.

Query_String
The information that follows the ? in the URL that referenced this script.

Remote_Addr
The IP address of the remote host making the request.

Remote_Host
The name of the host making the request.

Remote_Ident
This variable will be set to the remote user name retrieved from the server. Use this variable only for logging.

Remote_User
Authentication method that returns the authenticated user name.

Request_Method
The method used to make the request. For HTTP, this is "GET," "HEAD," "POST," and so on.

Script_Name
A virtual path to the script being executed, used for self-referencing URLs.

Server_Name
The server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.

Server_Protocol
The name and revision of the information protocol accompanying this request.

Server_Port
The port to which the request was sent.

Server_Software
The name and version of the information server software running the CGI program.

Server_URL_Gateway_Interface
The version of the CGI spec with which the server complies.


Associated with a lot of the $$ fields are the following forms:

$$ViewTemplate for viewname
Requires a 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. For example, the form named "$$ViewTemplate for By Author" associates the form with the By Author view.
Domino requires an Embedded View or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplate for navigatorname
Requires a embedded navigator or $$NavigatorBody field.
Associates the form with a specific navigator. The form name includes navigatorname, which is the navigator name. For example, the form named "$$NavigatorTemplate for World Map" associates the form with the World Map navigator.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value. Domino ignores create and read access lists on the form.
(source: Notes Help 4.6)

$$ViewTemplateDefault
Requires a embedded view or $$ViewBody field.
Makes this form the template for all Web views that aren't associated with another form.
Domino requires an embedded view or the $$ViewBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$NavigatorTemplateDefault
Requires a embedded navigator or $$NavigatorBody field.
Makes this form the template for all Web navigators that aren't associated with another form.
Domino requires an embedded navigator or the $$NavigatorBody field on the form, but ignores the value.
(source: Notes Help 4.6)

$$SearchTemplate for viewname
Associates the form with a specific view. Domino requires the $$ViewBody field, but ignores the value. The form name includes viewname, which is the alias for the view, or, when no alias exists, the name of the view. For example, the form named "$$SearchTemplate for All Documents" associates the form with the All Documents view.
(source: Notes Help 4.6)

$$SearchTemplateDefault
Domino requires the $$ViewBody field, but ignores the value. This form is the default for all Web searches that aren't associated with a specific form.
(source: Notes Help 4.6)

$$SearchSiteTemplate
In a site search this form is used in stead of $$SearchTemplateDefault
(source: posting by Andrew S Grant on Notes.Net)

$$Search
When a user initiates a text search from the Web, Domino looks in the current database or in the search site database in a multiple-database search for a form with the actual name or the alias name $$Search. If the form exists, Domino opens it; otherwise, Domino displays the default search.htm file stored in the domino\icons directory.
(source: Notes Help 4.6)


And another set of very useful forms (i didn't even know they exsisted until a few moments
before):

$$ReturnDocumentDeleted
Displays to Web users when the user successfully deletes documents. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthenticationFailure
Displays to Web users when the user's name and password can't be verified. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnAuthorizationFailure
Displays to Web users when the user doesn't have a high enough access level to access the database.
Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6)

$$ReturnGeneralError
Displays to Web users when any other errors occur.. Create an editable text field named MessageString to hold the error message.
(source: Notes Help 4.6) 

Validating a rich text field

Validating a rich text field:

http://www.ibm.com/developerworks/lotus/library/rich-text-field-notes/

I have copy pasted the three methods from the above link for my reference.

Method 1

In the first method, if the field contains any input (even only a single space character), then it can pass the validation. This validation uses the Querysave event of the form that contains the field. The following LotusScript sample code performs this validation:


Sub Querysave(Source As Notesuidocument, Continue As Variant)
            If ( Source.FieldGetText( "rtfield" ) = "" ) Then
                 Messagebox( "Please enter some text." )
                 Call Source.GotoField( "rtfield" )
                 Continue = False
         End If
End Sub


The code checks for any character in the field rtfield. If the field contains input (even if it consists solely of one or more space characters), then validation succeeds. If the field is empty, then the code returns an error message, and doesn’t save the document (by setting Continue to False).

Method 2

In the second method, the rich text field must contain at least one non-space character (in other words, an input consisting entirely of one or more spaces is not allowed). This check also uses the Querysave event of the form:


Sub Querysave(Source As Notesuidocument, Continue As Variant)
        
         Dim rtitem As NotesRichTextItem
         Set doc = Source.Document
         Set rtitem = doc.GetFirstItem( "rtfield" )
         Dim text As String
        
         text$ = Source.FieldGetText("rtfield")
         trimmed$ = Trim(text)
           
            if ( trimmed$ = "") Then
                 Msgbox "Please enter some text."
                 Continue = False
                 source.GotoField("rtfield")
                 source.Refresh(True)
         Else
                 Continue = True
                
         End If
End Sub


Method 3

Our third method validates a rich text field in which an input consisting solely of an attachment, embedded object, or link is allowed, even if it includes no accompanying text. Once again, we use the Querysave event of the form containing the field:



Sub Querysave(Source As Notesuidocument, Continue As Variant)
        
         Dim rtitem As NotesRichTextItem
         Set doc = Source.Document
         Set rtitem = doc.GetFirstItem( "rtfield" )
         Dim text As String
        
         text$ = Source.FieldGetText("rtfield")
         trimmed$ = Trim(text)
        
         If(doc.Hasembedded)  Then
                 Continue = True
                                  
         Elseif ( trimmed$ = "") Then
                 Msgbox "Please enter some text."
                 Continue = False
                 source.GotoField("rtfield")
                 source.Refresh(True)
         Else
                 Continue = True
        
            End If
End Sub


This code will work if there is an attachment anywhere in the document, even if it's not in the field that is being validated.

Clever barcode on the Savana cider bottles, love it when companies do something different!