2010-01-24

Domino URL cheat sheet



Editor's note: This article has been updated for Domino 6 with information that also appears in Domino Designer 6 Help. Many of these commands and arguments are supported by the latest maintenance release of Domino 5, except where indicated.
Domino uses URLs to access servers, databases, and other components of a Web site. Knowing the URL commands lets you design links or enter commands directly into a browser to navigate a site or reach components quickly. You can use the URL commands to:
  • Open databases and views
  • Open framesets
  • Open forms, navigators, and agents
  • Open, edit, create, save, and delete documents
  • Open documents by key name from a view
  • Open pages
  • Open resources
  • Open attachments, image files, and OLE objects
  • Open Web preferences
  • Create search queries
  • Require authentication
  • Process SSL certificates
  • Specify a character encoding
Domino URL commands have the following syntax:
http://Host/Database/DominoObject?Action&Arguments
Where:
  • Host is the DNS entry or IP address.
  • DominoObject is a Domino construct (such as a database, view, document, form, navigator, agent, and so on).
URL commands for accessing DominoObjects use the following syntax:
http://Host/Database/DominoObject?Action&Arguments
Where:
  • Database is the database in which the DominoObject resides.
  • Action is the action you want on the specified DominoObject (for example,?OpenDocument).
  • Arguments are the qualifiers for the action (for example, Count=10 combined with ?OpenView limits the number of rows displayed in a view to 10).
For additional information on URL syntax, see the Syntax guidelines sidebar.
Note: The URL examples in this article are not intended to point to actual Domino-based Web sites, unless specifically stated.
The following commands access databases, views, About and Using documents, and database icons.
Redirect
Syntax:
http://Host/Database.nsf?Redirect&Name=Notesserver&Id=To=Encodedurl
Where:
  • http: //Host refers to the Web server that is generating the URL.
  • Name= Notesserver specifies a Domino server name in its common or abbreviated form. This is optional when the "By Database" setting on the server is on.
  • Id= indicates the replica ID of the database to be located. This is an optional argument.
  • To= Encodedurl specifies the rest of the URL.
Example:
http://www.acme.com/database.nsf?Redirect&Name=Mail&Id=0525666D0060ABBF& To=%FAView%3FOpenView
Syntax:
http://Host/DatabaseFileName?OpenDatabase http://Host/_DatabaseReplicaID?OpenDatabase
Examples:
http://www.acme.com/leads.nsf?OpenDatabase
http://www.acme.com/sales/discussion.nsf?OpenDatabase
http://www.acme.com/_852562F3007ABFD6?OpenDatabase
Syntax:
http://Host/Database/ViewName?OpenView
http://Host/Database/ViewUniversalID?OpenView
http://Host/Database/$defaultview?OpenView
Examples:
http://www.acme.com/leads.nsf/By+Salesperson?Open/View
http://www.acme.com/leads.nsf/DDC087A8ACE170F8852562F300702264?OpenView
http://www.acme.com/leads.nsf/$defaultview?OpenView
Append these optional arguments to refine the OpenView URL. Combine any of the following arguments for the desired result.
Start= n
Where n is the row number to start with when displaying the view. The row number in a hierarchical view can include sub indexes (for example, Start=3.5.1 means the view will start at the third main topic, subtopic 5, document 1).
Count= n
Where n is the number of rows to display.
ExpandView displays the view in expanded format.
CollapseView displays the view in collapsed format.
Expand= n
Where n is the row number to display in expanded format in a hierarchical view.Do not combine this argument with the ExpandView or CollapseView arguments.
Collapse= n
Where n is the row number to display in collapsed format in a hierarchical view.Do not combine this argument with the ExpandView or CollapseView arguments.
RestrictToCategory= category
Sets the category for "Show Single Category" object, where category is the category to be displayed in the view.
StartKey= string
Where string is a key to a document in the view. The view displays at that document.
Examples:
http://www.acme.com/leads.nsf/By+Category?OpenView&CollapseView
http://www.acme.com/leads.nsf/By+Category?OpenView&ExpandndView
http://www.acme.com/leads.nsf/By+Category?OpenView&RestrictToCategory=pricing
http://www.acme.com/leads.nsf/By+Category?OpenView&Start=3&Count=15
http://www.acme.com/leads.nsf/By+Category?OpenView&StartKey=F
Use the $about?OpenAbout command to access the About This Database document.
Syntax:
http://Host/Database/$about?OpenAbout
Example:
http://www.acme.com/leads.nsf/$about?OpenAbout
Use the $help?OpenHelp command to access the Using This Database document.
Syntax:
http://Host/Database/$help?OpenHelp
Example:
http://www.acme.com/leads.nsf/$help?Open/Help
Use the $icon?OpenIcon command to access the database icon.
Syntax:
http://Host/Database/$icon?OpenIcon
Example:
http://www.acme.com/leads.nsf/$icon?OpenIcon
Use this command to access view data in XML form without appearance attributes such as fonts, list separators, date formats, HTML settings, view templates and frame redirections.
Syntax:
http://Host/Database/ViewName?ReadViewEntries
http://Host/Database/ViewUniversalID?ReadViewEntries
http://Host/Database/$defaultview?ReadViewEntries
Examples:
http://www.acme.com/leads.nsf/By+Salesperson?ReadViewEntries
http://www.acme.com/leads.nsf/DDC087A8ACE170F8852562F300702264?ReadViewEntries
http://www.acme.com/leads.nsf/$defaultview?ReadViewEntries
Append optional arguments to refine the URL. Combine any of the following arguments for the desired result.
Collapse= n
Where n is the row number to display in collapsed format in a hierarchical view.Do not combine this argument with the ExpandView or CollapseView arguments. CollapseView displays the view in collapsed format
Count= n
Where n is the number of rows to display
Expand= n
Where n is the row number to display in expanded format in a hierarchical view.Do not combine this argument with the ExpandView or CollapseView arguments. ExpandView displays the view in expanded format
KeyType= text or time
Specifies the StartKey type of either text or time. If no argument is specified, the default is text. When you specify &KeyType=time, you can specify a time value, like ISO date time value, for both the &StartKey and &UntilKey arguments.
PreFormat causes all data types to be converted to text on the server. Text lists, numbers, dates and lists of numbers are converted to text before being sent. The server's locale is used for all formatting. Without this argument, the XML output stream contains information in structured, locale-neutral formats.
ResortAscending= column number
ResortDescending= column number
Where column number is a 0-based number of a column in a view that you want to resort either ascending or descending in alphanumeric order.
RestrictToCategory= category
Sets the category for the "Show Single Category" object, where category is the category to be displayed in the view
Start= n
Where n is the row number to start with when displaying the view. The row number in a hierarchical view can include sub indexes (for example, Start=3.5.1 means the view will start at the third main topic, sub-topic 5, document 1).
StartKey= string
Where string is a key to a document in the view. The view displays at that document.
UntilKey= string
Displays a range of view entries that begin with the document specified by the StartKey and end with the document specified by the UntilKey. The &UntilKey argument is only valid with the &StartKey argument. You can use the &Count argument to limit the number of entries returned by the range.
Example:
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&CollapseView
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&ExpandView
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&KeyType=time&StartKey=20020715&UntilKey=20020714
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&KeyType=text&StartKey=Aa&UntilKey=Ab
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&PreFormat
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&ResortAscending=3
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&ResortDescending=3
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&RestrictToCategory=pricing
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&Start=3&Count=15
http://www.acme.com/leads.nsf/By+Category?ReadViewEntries&StartKey=F
This command opens framesets.
Syntax:
http://Host/Database/FramesetName?OpenFrameset
http://Host/Database/FramesetUNID?OpenFrameset
Examples:
http://www.acme.com/discussion.nsf/main?OpenFrameset
http://www.acme.com/discussion.nsf/35AE8FBFA573336A852563D100741784?OpenFrameset
The following commands open forms, navigators, and agents in a database.
Syntax:
http://Host/Database/FormName?OpenForm
http://Host/Database/FormUniversalID?OpenForm
http://Host/Database/$defaultform?OpenForm
Examples:
http://www.acme.com/products.nsf/Product?Openform
http://www.acme.com/products.nsf/625E6111C597A11B852563DD00724CC2?OpenForm
http://www.acme.com/products.nsf/$defaultform?OpenForm
ParentUNID = UniqueIDNumber
Where UniqueIDNumber is the document ID of the parent document, which is used in response forms or when the form property "Formulas inherit values from selected document" is selected.
Syntax:
http://Host/Database/FormUniversalID?OpenForm&ParentUNID=UniqueIDNumber
Example:
http://www.acme.com/products.nsf/40aa91d55cle4c8285256363004dc9e0?OpenForm &ParentUNID=6bc72a92613fd6bf852563de001f1a25
OpenNavigator
Syntax:
http://Host/Database/NavigatorName?OpenNavigator
http://Host/Database/NavigatorUniversallID?OpenNavigator
http://Host/Database/$defaultNav?OpenNavigator
Examples:
http://www.acme.com/products.nsf/Main+Navigator?OpenNavigator
http://www.acme.com/products.nsf/7B5BC17C7DC9EB7E85256207005F8862?OpenNavigator
http://www.acme.com/products.nsf/$defaultnav?OpenNavigator
Note: $defaultnav opens the folders pane in a database
OpenAgent
Syntax:
http://Host/Database/AgentName?OpenAgent
Example:
http://www.acme.com/sales/leads.nsf/Process+New+Leads?OpenAgent
Note: Agents may only be referred to by name. The use of UNID is not supported when referring to an agent.
ReadForm
Use the ReadForm command to display a form without showing its editable fields. ReadForm is useful for displaying a form as a simple Web page.
Syntax:
http://Host/Database/FormName?ReadForm
http://Host/Database/FormUniversalID?ReadForm
http://Host/Database/$defaultform?ReadForm
Examples:
http://www.acme.com/home.nsf/Welcome?ReadForm
http://www.acme.com/products.nsf/625E6111C597A11B852563DD00724CC2?ReadForm
http://www.acme.com/products.nsf/$defaultform?ReadForm
The following commands manipulate documents in a database. Hidden design elements are hidden from the server; you can't use Domino URL commands to access documents in hidden views.
CreateDocument
The CreateDocument command is used as the POST action of an HTML form.When the user submits a form, Domino obtains the data entered in the form and creates a document.
Syntax:
http://Host/Database/Form?CreateDocument
http://Host/Database/FormID?CreateDocument
Examples:
http://www.acme.com/products.nsf/basketballs?CreateDocument
http://www.acme.com/products.nsf/b9815a87b36a85d9852563df004a9533?CreateDocument
OpenDocument
Syntax:
http://Host/Database/View/DocumentKey?OpenDocument
http://Host/Database/View/DocumentUniversalID?OpenDocument
http://Host/Database/View/$First?OpenDocument
Note: DocumentKey is the contents of the first sorted column in the specified view.
Examples:
http://www.acme.com/products.nsf/By+Part+Number/PC156?OpenDocument
http://www.acme.com/leads.nsf/By+Rep/35AE8FBFA573336A852563D100741784?OpenDocument
http://www.acme.com/leads.nsf/$First?OpenDocument
Optional arguments for OpenDocument
See the Optional outline arguments sidebar for outline arguments that apply to both OpenDocument and OpenPage.
EditDocument
Syntax:
http://Host/Database/View/Document/?EditDocument
Example:
http://www.acme.com/products.nsf/By+Part+Number/PC156?EditDocument
Note: Rich text fields containing hidden text will be visible to Web users with editor access to documents.
SaveDocument
The SaveDocument command is used as the POST action of a document being edited. Domino updates the document with the new data entered in the form.
Syntax:
http://Host/Database/View/Document?SaveDocument
Example:
http://www.acme.com/products.nsf/a0cefa69d38ad9ed8525631b006582d0/4c95c7c6700160e2852563df0078cfeb?SaveDocument
DeleteDocument
Syntax:
http://Host/Database/View/Document?DeleteDocument
Example:
http://www.acme.com/products.nsf/By+Part+Number/PC156?DeleteDocument
The following commands allow you to open a document by key, or to generate a URL to link to a document by key.
Using Domino URLs to access a document
To open a document by key, create a sorted view with the sort on the first key column. Then you can use a URL to open the document:
Syntax:
http://Host/DatabaseName/View/DocumentName?OpenDocument
Where View is the name of the view, and DocumentName is the string, or key, that appears in the first sorted or categorized column of the view. Use this syntax to open, edit, or delete documents, and to open attached files. Domino returns the first document in the view whose column key exactly matches the DocumentName.
There may be more than one matching document; Domino always returns the first match. The key must match completely for Domino to return the document.However, the match is not case-sensitive or accent-sensitive.
Note that View can be a view UNID or view name. In addition, the implicit form of any of these commands will work when appropriate. (EditDocument and DeleteDocument must be explicit commands.)
Examples:
http://www.acme.com/register.nsf/Registered+Users/Jay+Street?OpenDocument
LDD Today uses a document key view called Lookup. For example, the URL for this article is:
http://www.lotus.com/ldd/today.nsf/lookup/Domino_URL_cheat_sheet?OpenDocument
To get a closer look at the Lookup view, you can download the LDD Today design template from the Sandbox here on LDD.
Using Domino URLs to access attachments
To access a file attachment using a Domino URL, you must know the view name, the document name, and the file attachment name. Domino generates an URL for file attachments when it saves the documents to which the files are attached. These URLs end with the file name of the attachment.
Syntax:
http://Host/DatabaseName/View/DocumentName/$File/fileattachmentname
Where View is either the view name or the view ID, and DocumentName is the document name or ID. $File is a special identifier that indicates an attachment on a document. Fileattachmentname is the file name of the attachment.
Examples:
http://www.acme.com/products.nsf/Documents/$File/Spec_sheet.pdf
The following command will open a page element using its name, UNID, or Note ID.
OpenPage
Syntax:
http://Host/Database/PageName?OpenPage
http://Host/Database/PageUNID?OpenPage
Examples:
http://www.acme.com/discussion.nsf/products?OpenPage
http://www.acme.com/discussion.nsf/35AE8FBFA573336A852563D100741784?OpenPage
Optional arguments for OpenPage
See the Optional outline arguments sidebar for outline arguments that apply to both OpenDocument and OpenPage.
The following commands open image and file resources stored in an database.
OpenImageResource
Opens graphics stored as image resources in a database.
Syntax:
http://Host/Database/ImageResourceName?OpenImageResource
Where ImageResourceName is the file name of the image resource that you want to open.
Example:
http://www.acme.com/discussion.nsf/banner.gif?OpenImageResource
OpenFileResource
Opens a file resource stored in a database.
Syntax:
http://Host/Database/FileResourceName?OpenFileResource
Where FileResourceName is the name of the file that you want to open.
Example:
http://www.acme.com/discussion.nsf/index.js?OpenFileResource
The ?OpenElement command opens attachments, image files, and OLE objects within a document.
Using ?OpenElement with file attachments
Syntax:
http://Host/Database/View/Document/$File/Filename?OpenElement
Example:
http://www.acme.com/lproducts.nsf/By+Part+Number/SN156/$File/spec.txt?OpenElement
Note that if more than one attached file has the same name, the URL includes both the "internal" file name as well as the external name. Since the internal file name is not easily determined, make sure all attached files have unique names.
Domino treats all file attachment OpenElement commands as implicit commands, because some browsers require that the URL end with the attached file name. For example:
http://Host/Database/View?Document/$File/FileName
Using ?OpenElement with image files
Syntax:
http://Host/Database/View/Document/FieldName/FieldOffset?OpenElement&FieldElemFormat=ImageFormat
FieldOffset is the field number and the byte offset into the field. ImageFormat is either GIF or JPG. If the FileElemFormat is not entered, Domino assumes the image file format is GIF.
Example:
http://www.acme.com/leads.nsf/bbe63a6b9d895dc6852567d600658601/fe5138bef254cf3a852569fc00724b69/Body/0.18AA?OpenElement&FieldElemFormat=jpg
Using Open Element with OLE Objects
Syntax:
http://Host/Database/View/Document/FieldName/FieldOffset/$OLEOBJINFO/FieldOffset/obj.ods?OpenElement
Note that the current URL syntax for referencing images and objects in Notes documents-specifically the FieldOffset-makes it impractical to create these URLs manually. As an alternative, you may paste the actual bitmap or object in place of the reference, create URL references to files stored in the file system, or attach the files to the documents.
The following command opens Web preferences, a Domino 6 feature that lets users set time zone and regional preferences. For more information about Web preferences, see the LDD Today article, "Making Web browsers look smarter with Domino 6 ."
This URL command is not supported by Domino 5 servers.
OpenPreferences
Syntax:
http://Host/$Preferences.nsf?OpenPreferences&Argument
Where:
  • Host indicates a server or a domain
  • $Preferences.nsf is a virtual database that "resides" on the Domino 6 server
  • ?OpenPreferences displays the default frameset of the virtual database
  • &Argument is an optional argument that you can specify to open a page instead of the frameset
The $Preferences.nsf database resides at the root of each server.
Example:
http://www.acme.com/$Preferences?OpenPreferences
Optional argument for OpenPreferences 
You can append the following optional arguments to the ?OpenPreferences command to open a specfiied page rather than the Web preferences default frameset.
PreferenceType= value
Where value can be one of the following values described in the table:
ValueDescription
MenuDisplays the Menu page which provides links to the Time Zone and Regional preferences page.
TimeZoneDisplays the Time Zone preferences page.
RegionalDisplays the Regional preferences page.
Examples:
http://www.acme.com/$Preferences?OpenPreferences&PreferenceType=Menu
http://www.acme.com/$Preferences?OpenPreferences&PreferenceType=TimeZone
http://www.acme.com/$Preferences?OpenPreferences&PreferenceType=Regional
Search-related URLs are available for performing view, multiple-database, and domain searches. Typically you define a URL that displays an input form-either a customized search form or the default search form-to let users define their own searches, but you may also define a URL that performs text searches without user input. Both input and results forms may be customized.
SearchDomain
Use SearchDomain URLs for text searches across a domain. The search input form is opened with the OpenForm command by name or universal ID. For search results, the results template is specified as part of the URL. If no template is found, then the default template form, $$SearchDomainTemplate, is substituted. If $$SearchDomainTemplate is not found, an error will be returned.If no results are returned, the value of the $$ViewBody field remains the same.
Syntax:
http://Host/Database/TemplateForm?SearchDomain&ArgumentList
Where:
  • TemplateForm is an optional argument that calls the search results form.
  • ArgumentList is a list of optional arguments.
Example:
http://www.acme.com/domainsearch.nsf/SearchForm?SearchDomain
SearchSite
Use SearchSite URLs for text searches in multiple databases. Because the URL requires the name of a search site database, be sure to create one before using a SearchSite URL.
Syntax:
http://Host/Database/$SearchForm?SearchSite&ArgumentList
Where $SearchForm and ArgumentList are optional arguments.
Example:
http://www.acme.com/searchsite.nsf/$SearchForm?SearchSite
SearchView
Use SearchView URLs to limit a search to documents displayed in one database view. This URL is useful for views that display all documents (so you can have a full-database search) or for views in which you can predict what users need to see, such as all documents whose status is "Completed."
Syntax:
http://Host/Database/View/$SearchForm?SearchView&ArgumentList
Where $SearchForm and ArgumentList are optional arguments. The special identifier $SearchForm indicates that Domino will present a search view form for search input. If this identifier is provided, the ArgumentList is ignored. If this identifier is absent, a default form will be generated on the fly based on the contents of the search.htm file located on the server. The default form generated by the server does not support paged results.
Example:
http://www.acme.com/products.nsf/By+Product+Number/$SearchForm?SearchView
Optional arguments for SearchSite, SearchView, and SearchDomain
$SearchForm
$SearchForm is a special identifier indicating a custom search form that Domino displays. When this argument is specified, Domino ignores all arguments that follow it. If this argument is not specified, Domino displays a default search form based on the search.htm file on the server.
Query= string
Where string is the search string.
Count= n
Where n is the number of results to display on each page until the SearchMax has been reached. For example Count=10 will display 10 results per page.
Scope=[0,1,2]
Where 1=Notes databases only, 2=file system only, 0=both. The default value is 0. This argument should only be used with the SearchDomain command.
SearchEntry= formName
Where formName is the name of the form to use for the results of a domain search. The default argument is "ResultEntry," which supports all of the pre-defined results fields specified in the ArgumentList. This argument is valid for SearchDomain only and should not be used for SearchSite or SearchView.
SearchFuzzy=[TRUE,FALSE]
Indicate TRUE for fuzzy search. The default is FALSE.
SearchOrder=[1,2,3,4]
Indicate 1 to "Sort by relevance", 2 to "Sort by date ascending", 3 to "Sort by date descending." The default is 1. SearchView also supports a SearchOrder value of 4 to "Keep current order", which sorts the resulting set of documents in the order in which they appear in the view.
SearchMax= n
Where n is the maximum number of entries returned. The default value is determined by the server.
SearchWV=[TRUE, FALSE]
Where TRUE = include word variants in the search. The default value is FALSE.
Start= n
Where n is the number corresponding to the document that appears first in your list of results. For example, Start=10 begins your list of results with the 10th document found in the search. Start=0 means that paged results will not be returned.
You can use the Start and Count arguments with the SearchView or SearchSite URLs as well as with the search results page to display search results page-by-page. The Start argument specifies which result appears first in the search results list. The Count argument determines the number of results displayed on the screen. For instance, if you specify Start=1 and Count=10, the search results begin with the first result and displays the next ten results on the screen. If results extend beyond ten, you can use button or hotpsots to navigate the search results pages.
For more information about creating buttons or hotspots for the Start and Count arguments, see the Domino Designer 6 Help.
Examples:
http://www.acme.com/welcome.nsf/?SearchSite&Query=product+info+requests&SearchOrder=2 &SearchMax=30&SearchWV=TRUE&SearchEntry="myResultsForm"

http://www.acme.com/products.nsf/By+Product+Number/?SearchView&Query=PC156&SearchOrder=3&SearchMax=1&SearchFuzzy=TRUE&SearchWV=FALSE
Append the following command to any Domino URL to force user authentication regardless of the database access control list. This ensures that anonymous Web users who weren't initially prompted for a name and password when they entered the site are required to supply a name and password to complete tasks that require user identity.
Login
Syntax:
http://Host/Directory/Database?OpenDatabase&Login
Examples:
http://www.acme.com/sales/leads.nsf?OpenDatabase&Login
The following commands automate the request and receipt of Secure Sockets Layer (SSL) certificates stored in a database.
OpenForm with SpecialAction argument
Syntax:
http://Host/Database/FormName?OpenForm&SpecialAction=specialActionField
Where specialActionField is the name of an editable text field on the form whose value contains a predefined command. To use the field with SSL certificates, use one of the following certificate request commands:
  • "SubmitCert"
  • "ServerRequest"
  • "ServerPickup"
Examples:
http://www.acme.com/certs.nsf/UserCertificateRequest?OpenForm&SpecialAction=SubmitCert
http://www.acme.com/certs.nsf/ServerCertificateRequest?OpenForm&SpecialAction=ServerRequest
http://www.acme.com/certs.nsf/Certificate?OpenForm&SpecialAction=ServerPickup
SubmitCert
The SubmitCert command creates a User Certificate document in the specified database, using the form specified in the TranslateForm argument.
Syntax:
http://Host/Database/ResultForm?RequestCert&Command=SubmitCert&TranslateForm=TranslationFormName
Where:
  • ResultForm is a form in the specified database that displays information about the processed request.
  • TranslationFormName represents a form in the database that contains fields to hold certificate information.
Example:
http://www.acme.com/certs.nsf/CertificateProcessed?RequestCert&Command=SubmitCert&TranslateForm=Certificate&TranslateForm=Certificate
Optional and required fields
The SubmitCert command requires a translation form with a field named Certificate. Domino saves information about the certificate subject and issuer in the document if the form contains fields with these names:
  • CommonName
  • OrgUnit
  • Locality
  • State
  • Country
  • IssuerCommonName
  • IssuerOrg
  • IssuerOrgUnit
  • IssuerLocality
  • IssuerState
  • IssuerCountry
ServerRequest
The ServerRequest command creates a Server Certificate Request document in the specified database, using the form specified in the TranslateForm argument.
Syntax:
http://Host/Database/MessageForm?RequestCert&Command=ServerRequest&TranslateForm=TranslationFormName
Where ResultForm is a form in the specified database that displays information about the processed request in the user's browser after a successful submission.TranslationFormName represents a form in the database that contains fields to hold certificate information.
Example:
http://www.acme.com/certs.nsf/CertificateProcessed?RequestCert&Command=ServerRequest&TranslateForm=Certificate&TranslateForm=Certificate
Optional and required fields
The ServerRequest command requires a translation form with a field named Certificate. Domino saves information about the server request in the document if the form contains fields with these names:
  • CommonName
  • OrgUnit
  • Locality
  • State
  • Country
To specify a character encoding for a design element, append the charset= MIMEcharset argument to the end of any URL command. You can use this argument with any design element or Notes object, including agents, folders, views, databases, and so on. This argument returns a form or page in the specified language or character set overriding the Web browser's preferred language setting as well as the $$HTMLContentLang field of a form. To use the charset=MIME charset argument, you must include it in your application. The Domino server does not generate this argument automatically.
Syntax:
http://Host/Form?OpenForm&charset= MIME charset
Where Form is either the form name or ID to open and MIME charset indicates the character encoding applied to the form.
Domino recognizes a limited number of character set names. If Domino does not recognize a specified character set, it defaults to the character set specified in the Server document.
Example:
http://www.acme.com/products.nsf/Product?Openform&charset=ISO-2022-JP
The previous example opens the Product form with a Japanese character encoding.

2008-06-16

Notes: How to add a database to the Replicator page programmatically

To achieve this, just use this formula:

@Command( [ToolsReplicate] ; 0 ) programmatic

2008-04-03

Notes: How to re-order rows on a 'dynamic' table

If you have a 'dynamic' table where each column is composed by a multivalue field and you want to be able to change a row's position, then you can do it like this:

  • Create a multivalue, computed for display field (hidden), named 'FldPos' with this formula:
@For(i:=1;i<=@Elements(fldProxiesName);i:=i +1;
sList:=sList : @Text(i)
);
@Trim(sList)



  • Create a radio button field, named 'FldPosRB' and select "Use formula for choices" and then on the formula window type:
FldPos

  • Then create two Buttons (or Action Hotspots), one called "Move Up" and another "Move Down".

The code for the first button is (for a 3 column table):
' moving up
Sub Click(Source As Button)
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim iCurPos As Integer

Dim vFinalList() As Variant
Dim vFinal1List() As Variant
Dim vFinal2List() As Variant

Dim vTemp As Variant

Dim sFieldSelection As String

Dim aFieldNames(2) As String

sFieldSelection = "FldPosRB"

aFieldNames(0)="FldMultivalue1"
aFieldNames(1)="FldMultivalue2"
aFieldNames(2)="FldMultivalue3"


Dim i As Integer

On Error Goto ErrorHandling

Set uidoc = ws.CurrentDocument


If Not isArrayInit(uidoc.document.GetItemValue(aFieldNames(0))) Then
Msgbox "The table is empty." , 64 , "Move up"
Exit Sub
End If

iCurPos =Cint(uidoc.document.getitemvalue(sFieldSelection)(0)) - 1

If iCurPos > 0 Then

For i=0 To Ubound (uidoc.Document.GetItemValue(aFieldNames(0)))
If i = iCurPos - 1 Then 'the position to move to
Redim Preserve vFinalList (i)
vFinalList(i) = uidoc.Document.getitemvalue(aFieldNames(0))(iCurPos)
Redim Preserve vFinal1List (i)
vFinal1List(i) = uidoc.Document.getitemvalue(aFieldNames(1))(iCurPos)
Redim Preserve vFinal2List (i)
vFinal2List(i) = uidoc.Document.getitemvalue(aFieldNames(2))(iCurPos)


Redim Preserve vFinalList (i + 1)
vFinalList(i + 1) = uidoc.Document.getitemvalue(aFieldNames(0))(i)
Redim Preserve vFinal1List (i + 1)
vFinal1List(i + 1) = uidoc.Document.getitemvalue(aFieldNames(1))(i)
Redim Preserve vFinal2List (i + 1)
vFinal2List(i + 1) = uidoc.Document.getitemvalue(aFieldNames(2))(i)


i = i + 1

Else
Redim Preserve vFinalList (i)
vFinalList(i) = uidoc.Document.getitemvalue(aFieldNames(0))(i)
Redim Preserve vFinal1List (i)
vFinal1List(i) = uidoc.Document.getitemvalue(aFieldNames(1))(i)
Redim Preserve vFinal2List (i)
vFinal2List(i) = uidoc.Document.getitemvalue(aFieldNames(2))(i)


End If
'vFinalList =
Next

Call uidoc.document.ReplaceItemValue(aFieldNames(0), vFinalList)
Call uidoc.document.ReplaceItemValue(aFieldNames(1), vFinal1List)
Call uidoc.document.ReplaceItemValue(aFieldNames(2), vFinal2List)

Call uidoc.Document.replaceitemvalue(sFieldSelection, iCurPos)
uidoc.Refresh
uidoc.refresh
End If

errorhandling:
If Err=9 Then 'subscript out of range, one column is empty
Resume Next
Elseif Err>0 Then
Msgbox "Error: " + Error
Goto EndThis
End If

EndThis:
End Sub




And to move down (logical differences in bold):

' moving down
Sub Click(Source As Button)
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim iCurPos As Integer

Dim vFinalList() As Variant
Dim vFinal1List() As Variant
Dim vFinal2List() As Variant
Dim sFieldSelection As String

Dim aFieldNames(2) As String

sFieldSelection = "FldPosRB"

aFieldNames(0)="FldMultivalue1"
aFieldNames(1)="FldMultivalue2"
aFieldNames(2)="FldMultivalue3"


Dim i As Integer

On Error Goto ErrorHandling

Set uidoc = ws.CurrentDocument

If Not isArrayInit(uidoc.document.GetItemValue(aFieldNames(0))) Then
Msgbox "The table is empty." , 64 , "Move down"
Exit Sub
End If

iCurPos =Cint(uidoc.document.getitemvalue(sFieldSelection)(0)) - 1


If iCurPos < i="0" style="font-weight: bold;">i = iCurPos Then
Redim Preserve vFinalList (i)
vFinalList(i) = uidoc.Document.getitemvalue(aFieldNames(0))(iCurPos + 1)
Redim Preserve vFinal1List (i)
vFinal1List(i) = uidoc.Document.getitemvalue(aFieldNames(1))(iCurPos + 1)
Redim Preserve vFinal2List (i)
vFinal2List(i) = uidoc.Document.getitemvalue(aFieldNames(2))(iCurPos + 1)



Redim Preserve vFinalList (i + 1)
vFinalList(i + 1) = uidoc.Document.getitemvalue(aFieldNames(0))(iCurPos)
Redim Preserve vFinal1List (i + 1)
vFinal1List(i + 1) = uidoc.Document.getitemvalue(aFieldNames(1))(iCurPos)
Redim Preserve vFinal2List (i + 1)
vFinal2List(i + 1) = uidoc.Document.getitemvalue(aFieldNames(2))(iCurPos)



i = i + 1
Else
Redim Preserve vFinalList (i)
vFinalList(i) = uidoc.Document.getitemvalue(aFieldNames(0))(i)
Redim Preserve vFinal1List (i)
vFinal1List(i) = uidoc.Document.getitemvalue(aFieldNames(1))(i)
Redim Preserve vFinal2List (i)
vFinal2List(i) = uidoc.Document.getitemvalue(aFieldNames(2))(i)

End If
Next


Call uidoc.document.ReplaceItemValue(aFieldNames(0), vFinalList)
Call uidoc.document.ReplaceItemValue(aFieldNames(1), vFinal1List)
Call uidoc.document.ReplaceItemValue(aFieldNames(2),vFinal2List)


Call uidoc.Document.replaceitemvalue(sFieldSelection, iCurPos + 2)
uidoc.Refresh
uidoc.refresh
End If

errorhandling:
If Err=9 Then 'subscript out of range, one column is empty
Resume Next
Elseif Err>0 Then
Msgbox "Error: " + Error
Goto EndThis
End If

EndThis:
End Sub

2008-01-14

Notes: SelectAll in an embedded view does not work

Problem:
When using the formula in an embedded view, no document is selected.

Solution:
Use a button with these formulas:

@Command([OpenView];"view_name");
@Command([ViewCollapseAll]);
@Command([ViewExpand]);
@Command([EditSelectAll]);
@Command([FileCloseWindow]);
@Command([ToolsRunMacro];"(dummy_agent_name)")

Posted on Notes Forum.

2008-01-10

Notes: Document has not yet been saved error.

Scenario:

Embedded view on a form (or page) has an action button that invokes a LS agent to work on selected documents. This works fine in a regular view.

Problem:

This action button returns the error: "Document has not yet been saved".

Solution:

In embedded views, the LS needs to be in the action button.

2007-11-08

Notes: When a space is not a space

Symptoms:

A field that receives numbers (either is a number field or is a text field that receives input from a number field on a dialog box), contains spaces (ex: 1 000 or 27 000) that can't be removed with a @ReplaceSubstring(field_name; " "; "").




Cause:


The number field has the "Punctuated at thousand" option set, which, in some user settings, causes the insertion of a space within the number. But this space is not the common ASCII character 32, but a special one: the ASCII character 160.






Solution:


Use this code:


sSpace1:=@char(32);
sSpace2:=@char(160);
sNumber:=@ReplaceSubstring(field_name; sSpace1; "");
sNumber:=@ReplaceSubstring(sNumber; sSpace2; "");

2007-10-25

Notes: Insert a DocLink into a Rich Text Field while editing the document (without the need of saving it)

There's a lotus script solution for this but it will cause a Replication Conflict if the document locking functionality is active on the database.

So, an alternative is to have a page with an embedded view showing the documents list from where the user will choose the document to link to, and then call this page on a dialog box.
On the page's QueryClose event, add this:

@Command([EditMakeDocLink])

And on the form where the RichTextField is, add a button or an Action with a formula similar to this:

@DialogBox( "pg_name" ; [AutoHorzFit] : [AutoVertFit] : [NoNewFields] :
[NoFieldUpdate] : [SizeToTable] : [ReadOnly] ; "Insert Doc Link" );
@Do
( @PostedCommand([EditGotoField];"rtf_field_name");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; "Document link: ");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditLeft];"2"); @PostedCommand([EditPaste]))

Notes: View Entry's ColumnValues returns an array for a specific column

This will happen if the column's property "Show multiple values as selected entries" is selected.

In this case the ColumnValues property of the NotesViewEntry class, will return an Array and the common way of obtaining it's value will fail.

To access the entry's column value weather it's an array or not, use this:


Function getColValue (vCol As Variant) As String
If Isarray(vCol) Then
getColValue = Cstr(vCol(0))
Else
getColValue = Cstr(vCol)
End If
End Function

And then use it like this:

stringValue = getColValue(vwEntry.ColumnValues(1))

2007-10-03

Notes: Scheduled agents on server

If you want to run (for troubleshoot purposes, for instance) an agent directly on a server, with the server's id, and you have no access to the machine, just run it from the web:

http://your_server/your_db_path/your_db/your_agent?openAgent

Now just go to the server's log to check for debug and/or error messages.

2007-08-02

Notes: Change the size of PicklistCollection dialog box

(from a notes forum post by Sam Chung)

«I have found out the ini for resize PickList Window:
"WindowSizePickKeywords"

However, the parameter is found in Notes6 rather than 5, so chk version before writing it.

You can enlarge the PickList Window size before calling @PickList and restore it after calling

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub AssignPickWinSize

'To enlarge the PickList WIndow Size by setting system Notes.INI
'Backup the sys one with the same name as a user setting($)
On Error Goto ErrH
Const delim = " "
Const key="WindowSizePickKeywords"
Dim tmpstr As String

Set ss = New NotesSession
'get the system variable
tmpstr=Trim(ss.GetEnvironmentString(key, True))
If Len(tmpstr) Then
'BackUp the environment var
Call ss.SetEnvironmentVar(key, tmpstr, False )

tmpArr= Fulltrim(Split(tmpstr, delim))

tmpArr(2)="1000"
tmpArr(3)="900"

tmpstr=Join(tmpArr, " ")
'Set
Call ss.SetEnvironmentVar(key, tmpstr, True)
End If
Exit Sub
ErrH:
Print "Err in setting picklist window size."
End Sub


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Sub RestorePickWinSize

'Restore the backup setting from the same name user setting($) in ini
On Error Goto ErrH
Const key="WindowSizePickKeywords"
Dim ss As NotesSession
Dim tmpstr As String
Set ss = New NotesSession

tmpstr=Trim(ss.GetEnvironmentString(key, False))
If Len(tmpstr) Then
'Reset the system
Call ss.SetEnvironmentVar(key, tmpstr , True )
'Clear the user one
Call ss.SetEnvironmentVar(key, "" , False )
End If

ErrH:

End Sub »

2007-05-23

Notes: a Smart Icon to update a field in a document

Many times there's the need to change a field's value to make a test or correct something. What can be more useful than a button sitting on the Smart Icon tab, with a formula to do just that?
There's many ways to accomplish this. From the simplest to the most complex:

Example 1:

FieldToChange := @Prompt([OkCancelEdit]; "Field to Change"; "Enter the name of the field to change."; "");
TypeOfData := @Prompt([OkCancelList]:[NoSort]; "Type of Field"; "Is this field Text, Number or DateTime?"; "Text"; "Text":"Number":"DateTime");
NewValue:=@Prompt([OkCancelEdit];"New Value";"Enter the new value for this field";"");

@If(FieldToChange=""|TypeOfData="";@Do(@Prompt([Ok];"Error";"You did not enter all requested data. Process halted.");@Return(""));"");

NumberValue:=@TextToNumber(NewValue);
valueerror:=@IsError(@If(TypeOfData="Number";NumberValue;3));
@If(valueerror=1;
@Do(@Prompt([Ok];"Error";"You did not specify a number for the new value. Process halted.");@Return(""));
"");

DateError:=@If(TypeOfData="DateTime";@If(@Text(@TextToTime(NewValue))="";1;0);0)
;
@If(DateError=1;
@Do(@Prompt([Ok];"Error";"You did not specify a date/time for the new value. Process halted.");@Return(""));
"");

continue := @Prompt([YesNo];"Click yes to continue.";"This agent will change the value of the *"+ FieldToChange +"* field on the selected documents to *"+ NewValue + "* . Continue?");

@If(continue=1;"";@Return(""));

@SetField(FieldToChange;
@If(TypeOfData="Text";NewValue;
TypeOfData="Number";@TextToNumber(NewValue);
@TextToTime(NewValue)));

@All


Example 2:
(from: Datatribe Softwerks)

strUNID := @Text(@DocumentUniqueID);

strFieldName := @Prompt([OkCancelEditCombo]; "Change Field Value"; "To change an existing Field, select the Field name." +
@Char(13) + "To create a new Field, enter the Field name." ;""; "":@DocFields);

strTmpCurrentValue := @If( @IsAvailable(strFieldName); @GetDocField(strUNID; strFieldName); "" );
strCurrrentValue := @If( @IsError(strTmpCurrentValue); ""; @Text(strTmpCurrentValue) );

strNewValue := @Prompt([OkCancelEdit]; "Change Field Value"; "Enter New Field Value: use semicolon (;) to separate multiple values for mulitvalue fields."; @Implode(strCurrrentValue;";"));

strFieldType := @Prompt([OkCancelList]; "Change Field Value"; "Select the Field Data Type";
"Text"; "Text" : "Time" : "Number" : "Text List" : "Number List" : "Time List":"Delete Field");

@If(

strFieldType = "Delete Field";
@SetField(strFieldName; @DeleteField);

strFieldType = "Time";
@SetField(strFieldName; @TextToTime(strNewValue));

strFieldType = "Number";
@SetField(strFieldName; @TextToNumber(strNewValue));

strFieldType = "Text List";
@SetField(strFieldName; @Trim(@Explode(strNewValue;";")));

strFieldType = "Number List";
@SetField(strFieldName; @TextToNumber(@Explode(@Trim(@ReplaceSubstring(strNewValue;" ";""));";")));

strFieldType = "Time List";
@SetField(strFieldName; @TextToTime(@Explode(strNewValue;";")));

@SetField(strFieldName; @Text(strNewValue))
)
Example 3:
(from: Datatribe Softwerks's comments)

REM {Get a listing of all the fields on the current document};
List := @DocFields;
PromptLimit := 254;

REM {Possible data types to choose from.};
REM {I called Number Integer because use keyboard to select what you want with keyboard quicker.};
DataTypes := "Text" : "Date" : "Integer" : "Password" : "Name" : "Common Name" : "Abbreviate Name" : "Remove Field" : "Text Multi Value" : "Date Multi Value" : "Integer Multi Value" : "Name Multi Value" : "Common Name Multi Value" : "Abbreviate Name Multi Value" : "Upper Case Text" : "Lower Case Text" : "Proper Case Text" : "Upper Case Text Multi Value" : "Lower Case Text Multi Value" : "Proper Case Text Multi Value" ;

REM {Prompt for which field needs to be updated.};
EditField := @Prompt( [OkCancelList] ; @DbTitle + " - " + @ViewTitle ; "Select the field you wish to alter:" ; "Subject" ; List ) ;

REM {Prompt for which data type you would like the data to be};
REM {This needs to be done before value prompt to determine if the Picklist or any prompting needs to be used.};
DataType := @Prompt( [OkCancelList] : [NoSort] ; EditField + " - " + @DbTitle + " - " + @ViewTitle; "Please select the correct data type or action for field: " + EditField + "."; "Text" ; DataTypes );

REM {Based on what type of data is being entered different prompts will happen if any at all.};
RawValue := @If(
@Contains( DataType ; "Name Multi Value" ); @PickList( [Name] );
@Contains( DataType ; "Name" ) ; @PickList( [Name] : [Single] );
DataType = "Remove Field" ; "" ;
@Contains( DataType ; "Multi Value" ); @Prompt( [OkCancelEdit] ; EditField + " - " + @DbTitle + " - " + @ViewTitle; "Please enter the new desired value for: " + EditField + "." + @Char(13) + @Char(13) + "Seperated with ; for each value." ; @Abstract([TextOnly] ; PromptLimit ; "" ; @Text( EditField ) ) );
@Prompt( [OkCancelEdit] ; EditField + " - " + @DbTitle + " - " + @ViewTitle ; "Please enter the new desired value for: " + EditField + "." ; @Abstract([TextOnly] ; PromptLimit ; "" ; @Text( EditField) ) ) );

REM {If data conversion doesn't work then don't set field.};
@If(
DataType = "Date" ; @If( @SetField( EditField ; @TextToTime( RawValue ) ) );
DataType = "Integer" ; @If( @IsError( @TextToNumber( RawValue ) ) ; "" ; @SetField( EditField ; @TextToNumber( RawValue ) ) ) ;
DataType = "Common Name" ; @SetField( EditField ; @Name( [CN]; RawValue ) ) ;
DataType = "Abbreviate Name" ; @SetField( EditField ; @Name( [Abbreviate]; RawValue ) ) ;
DataType = "Password" ; @SetField( EditField ; @Password( RawValue ) ) ;
DataType = "Remove Field" ; @SetField( EditField ; @DeleteField ) ;
DataType = "Text Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ";" ) ) ;
DataType = "Date Multi Value" ; @SetField( EditField ; @TextToTime( @Explode( RawValue ; ";" ) ) ) ;
DataType = "Integer Multi Value" ; @If( @IsError( @TextToNumber( @Explode( RawValue ; ";" ) ) ) ; "" ; @SetField( EditField ; @TextToNumber( @Explode( RawValue ; ";" ) ) ) ) ;
DataType = "Name Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ":" ) ) ;
DataType = "Common Name Multi Value" ; @SetField( EditField ; @Name( [CN]; @Explode( RawValue ; ":" ) ) );
DataType = "Abbreviate Name Multi Value" ; @SetField( EditField ; @Name( [Abbreviate]; @Explode( RawValue ; ":" ) ) );
DataType = "Upper Case Text" ; @If( @SetField( EditField ; @UpperCase( RawValue ) ) );
DataType = "Lower Case Text" ; @If( @SetField( EditField ; @LowerCase( RawValue ) ) );
DataType = "Proper Case Text" ; @If( @SetField( EditField ; @ProperCase( RawValue ) ) );
DataType = "Upper Case Text Multi Value" ; @If( @SetField( EditField ; @UpperCase( @Explode( RawValue ; ";" ) ) ) );
DataType = "Lower Case Text Multi Value" ; @If( @SetField( EditField ; @LowerCase( @Explode( RawValue ; ";" ) ) ) );
DataType = "Proper Case Text Multi Value" ; @If( @SetField( EditField ; @ProperCase( @Explode( RawValue ; ";" ) ) ) );
@SetField( EditField ; RawValue )
);
""
Example 4:
(from: ChadSmiley Blog)

REM {Edit Document Fields 6.0.0 by Chad Schelfhout.};
REM {Visit http://www.chadsmiley.com/EditDocumentFields for the latest updates};

REM {Changable constants};
cEnableConfirmation := @True;
cFieldHistoryValues := 10;
cStandardSeparators := ":" : ";" : " ";
cPromptTitle := @DbTitle + " - " + @ViewTitle;

REM {Unchangable constants};
cProfileName := "ChadSmiley Tools";
cEditLastField := "edfLastField";
cEditLastFieldDataType := "edfLastFieldDataType";
cEditLastFieldDataTypeValue := "edfLastFieldDataTypeValue";
cEditLastSeparator := "%~%";
cValueListSeparator := "^";
cFromRawValueSeparator := "%@%";
cSemicolonReplace := "#SC#";
cMaxSearchForSelectedDocs := 5520;
cMaxUpdatedDocuments := 1000;
cArraySeparator := ";";
cNoteEntryLength := 11;
cPromptNewLineOne := @Char(13);
cPromptNewLineTwo := cPromptNewLineOne + cPromptNewLineOne;
cPromptTab := @Char(9);
cCategoryNoteID := "NT00000000";
cTextExtractList := "Text Left":"Text Left Back":"Text Right":"Text Right Back";
cNoPromptList := cTextExtractList:"Remove Field":"Unique":"Sort Ascending":"Sort Descending":"Implode":"Explode":"Proper Case Text":"Proper Case Text Multi Value":"Lower Case Text":"Lower Case Text Multi Value":"Upper Case Text":"Upper Case Text Multi Value":"Password Convert":"Trim":"Trim then Unique";
cErrorCheckCode := "@Implode( @Unique( @Explode( NoteIDList : ErrorNoteID ; cArraySeparator ; @False ) ) )";
cErrorInformation := "\"Error documents: \" + @Implode( @Unique( @Explode( ErrorNoteIDList ; cArraySeparator ; @False ) ) ; \", \" ) + cPromptNewLineOne + \"Not updated documents: \" + @Implode( @Unique( @Explode( ErrorNoteIDList ; cArraySeparator ; @False ) ) ; \", \" )";


REM {Data types|@Function execution};
DataTypesCombo := @Explode(
"Integer|@TextToNumber( RawValue )$"+
"Integer Multi Value|@TextToNumber( @Explode( RawValue ; Separator; @True) )$"+
"Date|@ToTime( RawValue )$"+
"Date Multi Value|@ToTime( @Explode( RawValue ; Separator; @True) )$"+
"Text|@Text( RawValue )$"+
"Text Multi Value|@Text( @Explode( RawValue ; Separator; @True) )$"+
"Text Left|@Left( @Text( @GetField( EditField[ef] ) ) ; ExtractValue )$"+
"Text Left Back|@LeftBack( @Text( @GetField( EditField[ef] ) ) ; ExtractValue )$"+
"Text Right|@Right( @Text( @GetField( EditField[ef] ) ) ; ExtractValue )$"+
"Text Right Back|@RightBack( @Text( @GetField( EditField[ef] ) ) ; ExtractValue )$"+
"Trim|@Trim( @Text( @GetField( EditField[ef] ) ) )$"+
"Trim then Unique|@Unique(@Trim( @Text( @GetField( EditField[ef] ) ) ) )$"+
"Name|RawValue$"+
"Name Multi Value|RawValue$"+
"Common Name|@Name( [CN]; RawValue )$"+
"Common Name Multi Value|@Name( [CN]; @Explode( RawValue ; \":\"; @True ) )$"+
"Upper Case Text|@UpperCase( @Implode( @Text( @GetField( EditField[ef] ) ) ) )$"+
"Lower Case Text|@LowerCase( @Implode( @Text( @GetField( EditField[ef] ) ) ) )$"+
"Proper Case Text|@ProperCase( @Implode( @Text( @GetField( EditField[ef] ) ) ) )$"+
"Upper Case Text Multi Value|@UpperCase( @Explode( @Text( @GetField( EditField[ef] ) ) ; Separator; @True ))$"+
"Lower Case Text Multi Value|@LowerCase( @Explode( @Text( @GetField( EditField[ef] ) ) ; Separator; @True) )$"+
"Proper Case Text Multi Value|@ProperCase( @Explode( @Text( @GetField( EditField[ef] ) ) ; Separator; @True) )$"+
"Replace Substring|@ReplaceSubstring( @GetField( EditField[ef] ); FromRawValue ; RawValue )$"+
"Replace|@Explode( @Replace( @GetField( EditField[ef] ) ; FromRawValue ; RawValue ) ; Separator ; @True )$"+
"Implode|@Implode( @Text( @GetField( EditField[ef] ) ) ; Separator )$"+
"Explode|@Explode( @Text( @GetField( EditField[ef] ) ) ; Separator; @True )$"+
"Formula|@Eval( RawValue )$"+
"Abbreviate Name|@Name([Abbreviate]; RawValue )$"+
"Abbreviate Name Multi Value|@Name( [Abbreviate]; @Explode( RawValue ; Separator; @True ) )$"+
"Password Set|@Password( RawValue )$"+
"Password Convert|@Password( @GetField( EditField[ef] ) )$"+
"Remove Field|@DeleteField$"+
"Unique|@Unique(@GetField( EditField[ef]))$"+
"+ Append Values|@If(" +
" @GetField(EditField[ef]) = \"\"; RawValue;" +
" @Contains(DefaultDataType; \"Date\");" +
" @If( @IsError( @ToTime( RawValue ) ) ;" +
" \"\" ;" +
" @SetField( EditField[ef] ; @GetField(EditField[ef]) : @TextToTime( @Explode( RawValue ; Separator ) ) ) ) ;" +
" @Contains(DefaultDataType; \"Integer\" );" +
" @If( @IsError( @TextToNumber( @Explode( RawValue ; Separator ) ) ) ;" +
" \"\" ;" +
" @SetField( EditField[ef] ; @GetField(EditField[ef]) : @TextToNumber( @Explode( RawValue ; Separator ) ) ) ) ;" +
" @SetField( EditField[ef] ; @GetField(EditField[ef]) : @Explode( RawValue ; Separator ) ) )$"+
"Sort Ascending|@Sort(@GetField(EditField[ef]) ; [Ascending] )$"+
"Sort Descending|@Sort(@GetField(EditField[ef]); [Descending])" ; "$" );

DataTypes := @Word( DataTypesCombo ; "|" ; 1 );
DataTypesAction := @Word( DataTypesCombo ; "|" ; 2 );

REM {Get a listing of all the fields on the current document};
List := @Sort( @DocFields );

REM {Look for last field modified in Profile Doc};
FieldList := @Explode( @GetProfileField( cProfileName ; cEditLastField ; @UserName ) ; cArraySeparator ; @True ) ;

REM {Get the list of forms and field that was updated using Edit Document Fields};
FieldListForms := @Word( FieldList ; cEditLastSeparator ; 1 );
FieldListField := @Word( FieldList ; cEditLastSeparator ; 2 );
FieldListLastIndex := @Member( Form; FieldListForms );
REM {If the FieldListLastIndex is greater than zero then set the last field to the what was in the profile document};
@If( FieldListLastIndex > 0;
@Do( LastField := FieldListField[ FieldListLastIndex ];
FieldList := @ReplaceSubstring( FieldList ; FieldList[ FieldListLastIndex ] ; "" ) );
LastField :="" );

REM {Prompt for which field needs to be updated. Loop until a field is selected or 'Cancel' is selected};
@DoWhile(
EditField := @Prompt( [OkCancelEditCombo] ; cPromptTitle ; "Select the field you wish to alter or enter a new field to add:" ; LastField ; @Trim( @Unique( List : LastField ) ) );
EditField = "" );
EditFieldPromptTitle := "Change '" + EditField + "' in " + cPromptTitle;

REM {This will allow the retrieval of the data type of the field that was last selected. Data is stored like Form+Field%~%DataType.};
FormFieldList := @Explode( @GetProfileField( cProfileName ; cEditLastFieldDataType ; @UserName ) ; cArraySeparator ; @True ) ;
FormFieldListFormField := @Word( FormFieldList ; cEditLastSeparator ; 1 );
FormFieldListDataType := @Word( FormFieldList ; cEditLastSeparator ; 2 );
FormFieldListFormulaCode := @ReplaceSubstring( @Word( FormFieldList ; cEditLastSeparator ; 3 ) ; cSemicolonReplace ; ";" );
FormFieldListIndex := @Member( Form + EditField; FormFieldListFormField );
@If( FormFieldListIndex > 0;
@Do( DefaultDataType := FormFieldListDataType[ FormFieldListIndex ];
FormFieldListFormulaCode := FormFieldListFormulaCode[ FormFieldListIndex ];
FormFieldList := @ReplaceSubstring( FormFieldList ; FormFieldList[ FormFieldListIndex ] ; "" ) );
DefaultDataType :="" );

REM {If there was no data type used for the field on the form the try to determine the data type};
DefaultDataType :=
@If( DefaultDataType != "" ;
DefaultDataType ;
@If(
@IsNumber( @GetField( EditField ) ) ;
@If( @Count( @GetField( EditField ) ) > 1 ;
"Integer Multi Value" ;
"Integer" ) ;
@IsTime( @GetField( EditField ) ) ;
@If( @Count( @GetField( EditField ) ) > 1 ;
"Date Mult iValue" ;
"Date" ) ;
@If( @Count( @GetField( EditField ) ) > 1 ;
"Text Multi Value" ;
"Text" )
)
);

REM {If the data type is a type of error then select the data type of text};
DefaultDataType := @IfError( DefaultDataType ; "Text" );

REM {Prompt for which data type you would like the data to be. This needs to be done before value prompt to determine if the Picklist or any prompting needs to be used.};
DataType := @Prompt( [OkCancelList] ; EditFieldPromptTitle; "Please select the correct data type or action for field: " + EditField + "."; DefaultDataType ; DataTypes );

REM {The DataTypeAction will contain the formula that will be executed to retrieve the new value};
DataTypeAction := DataTypesAction[ @Member( DataType ; DataTypes ) ];

REM {If formula was used on this field then use that instead of the fields value. Format the original value as text because the @Prompt command requires text.};
OriginalValue := @If( DataType = "Formula" & DefaultDataType = "Formula" & FormFieldListFormulaCode != "" ;
FormFieldListFormulaCode ;
@If( @Contains( DefaultDataType ; MultiValue ) ;
@Implode( @Text( @GetField( EditField ) ) ; cArraySeparator );
@Text( @GetField( EditField ) ) )
);

REM {This will allow the retrieval of history of values of the field. Data is stored like Form+Field+DataType%~%ValueList.};
FormFieldListDataTypeValues := @Explode( @GetProfileField( cProfileName ; cEditLastFieldDataTypeValue ; @UserName ) ; cArraySeparator ; @True ) ;
FormFieldListFormFieldDataType := @Word( FormFieldListDataTypeValues ; cEditLastSeparator ; 1 ) ;
FormFieldListValuesLists := @Word( FormFieldListDataTypeValues ; cEditLastSeparator ; 2 ) ;
FormFieldListDTIndex := @Member( Form + EditField + DataType; FormFieldListFormFieldDataType );
@If( FormFieldListDTIndex > 0;
@Do( FormFieldListValuesList := FormFieldListDataTypeValues[ FormFieldListDTIndex ];
FormFieldListValuesList := @ReplaceSubstring( @Trim( @Explode( FormFieldListValuesLists[ FormFieldListDTIndex ] ; cValueListSeparator ; @False ) ) ; cSemicolonReplace; ";" );
FormFieldListDataTypeValues := @ReplaceSubstring( FormFieldListDataTypeValues ; FormFieldListDataTypeValues[ FormFieldListDTIndex ] ; "" ) );
FormFieldListValuesList :="" );

REM {Prompt for additional fields and determine the string that they are searching for.};
@If( DataType = ("Replace Substring":"Replace" ) ;
@Do( EditField := @Unique( EditField : @Prompt( [OkCancelListMult] ; cPromptTitle ; "Select any addtional fields you wish to alter:" ; EditField ; List ) );
FromRawValue := @Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle ; "Enter or select the text (case sensitive) to search for in: " + @Implode( EditField ; ", " ) + "." ; "" ; @Unique( @Word( FormFieldListValuesList ; cFromRawValueSeparator ; 2 ) ) ) );
@Do( EditField := EditField;
FromRawValue := "" )
);

REM { With the Edit combo there will be a list of standard seperators to choose from.};
Separator := @If( DataType = ("Implode":"Explode" ) ;
@Prompt( [OkCancelEditCombo] ; cPromptTitle ; "Enter or select the " + @If( DataType = "Implode" ; "separator" ; "separators" ) + ":" ; "" ; @Unique( @If( FormFieldListValuesList = "" ; cStandardSeparators ; FormFieldListValuesList : cStandardSeparators ) ) );
cArraySeparator );

REM {Determine the string to search for};
ExtractValue := @If( DataType = cTextExtractList ;
@Prompt( [OkCancelEditCombo] ; cPromptTitle ; "Enter or select the search string or string length:" ; @Subset( FormFieldListValuesList ; 1 ) ; @Unique( FormFieldListValuesList ) );
"" );

REM {Based on what type of data is being entered different prompts will happen if any at all.};
RawValue := @If(
@Contains( DataType ; "Name Multi Value" ) ; @PickList( [Name] );
@Contains( DataType ; "Name" ) ; @PickList( [Name] : [Single] );
DataType = ( cNoPromptList ) ; "" ;
@Contains( DataType ; "Multi Value" ) ; @Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle; "Enter or select the new desired value for: " + @Implode( EditField ; ", " ) + "." + cPromptNewLineTwo + "Seperated with ; for each value." ; OriginalValue ; @Unique( OriginalValue : FormFieldListValuesList ) ) ;
@Contains( DataType ; "+ Append Values" ) ; @Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle; "Enter or select values to append: " + @Implode( EditField ; ", " ) + "." + cPromptNewLineTwo + "Seperated with ; for each value." ; "" ; @Unique( FormFieldListValuesList ) ) ;
DataType = ("Replace Substring":"Replace" ) ; @Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle ; "Enter or select the text to repalce with in: " + EditField + "." ; "" ; @Unique( @Word( FormFieldListValuesList ; cFromRawValueSeparator ; 1 ) ) ) ;
DataType = "Formula" ; @Do( @DoWhile(
OriginalValue := @Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle ; "Enter or select the new desired formula for: " + EditField + "." ; OriginalValue ; @Unique( OriginalValue : FormFieldListValuesList ) );
tempReturnCheck := @CheckFormulaSyntax( OriginalValue );
@If( tempReturnCheck != "1"; @Prompt( [Ok] ; "Invalid Formula - " + EditFieldPromptTitle ;
"Invalid Formula entered: " +
cPromptNewLineTwo + cPromptTab + "Error: " + cPromptTab + cPromptTab + @Text( tempReturnCheck ) +
cPromptNewLineOne + cPromptTab + "Formula: " + cPromptTab + cPromptTab + OriginalValue ) ; "" );
tempReturnCheck != "1" );
OriginalValue );
@Prompt( [OkCancelEditCombo] ; EditFieldPromptTitle ; "Enter or select the new desired value for: " + EditField + "." ; OriginalValue ; @Unique( OriginalValue : FormFieldListValuesList ) )
);

REM {Store Field in Profile doc};
@SetProfileField( cProfileName ; cEditLastField ; @Unique( @Trim( FieldList : ( Form + cEditLastSeparator + EditField[1] ) ) ); @UserName );

REM {Store Data Type of Field in Profile doc};
@SetProfileField( cProfileName ; cEditLastFieldDataType ;
@Unique( @Trim( FormFieldList : ( Form + EditField[1] + cEditLastSeparator + DataType + cEditLastSeparator +
@ReplaceSubstring(
@If( DataType = "Formula" ; RawValue ; FormFieldListFormulaCode ) ;
";" ; cSemicolonReplace ) ) ) ) ;
@UserName );

REM {Store Data Value of Field in Profile doc};
@SetProfileField( cProfileName ; cEditLastFieldDataTypeValue ;
@Unique( @Trim( FormFieldListDataTypeValues : ( Form + EditField[1] + DataType + cEditLastSeparator +
@Implode(
@Subset(
@Unique(
@ReplaceSubstring(
@If( DataType = ("Implode":"Explode" ) ; Separator ;
DataType = cTextExtractList ; ExtractValue ;
DataType = ( "Replace Substring":"Replace" ) ; RawValue + cFromRawValueSeparator + FromRawValue ;
RawValue ) : FormFieldListValuesList ;
";" ; cSemicolonReplace ) ) ;
cFieldHistoryValues );
cValueListSeparator ) ) ) ) ;
@UserName );REM {If multi docs selected, only process those checked ... an unchecked doc cannot be NavNextSelected};
@Command([NavNextSelected]);
@UpdateFormulaContext;

REM {Store all Note IDs before manipulation in case field modifications cause categorized views or sorted columns to reorganize};
NoteIDList := @Text( @NoteID );
ErrorNoteIDList := "";
@Command([NavNextSelected]);
@UpdateFormulaContext;

REM {Start Looping Selected documents to gather all the documents that need to be updated.};
@While( ( @Left( NoteIDList ; cNoteEntryLength ) != ( @Text( @NoteID + cArraySeparator ) ) ) & ( @Length( NoteIDList ) <> 1 ; "s" ; "" ) + "." + cPromptTab + cPromptTab +
cPromptNewLineTwo + cPromptTab + "Field:" + cPromptTab + cPromptTab + EditField +
cPromptNewLineOne + cPromptTab + "Data type/action: " + cPromptTab + DataType +
cPromptNewLineOne + cPromptTab +
@If( DataType = ("Implode":"Explode" ) ; "Separator: " + cPromptTab + Separator ;
DataType = ("Text Left":"Text Left Back":"Text Right":"Text Right Back" ) ; "Search string: " + cPromptTab + ExtractValue ;
DataType = ("Replace Substring":"Replace" ) ; "Search string: " + cPromptTab + FromRawValue + cPromptNewLineOne + cPromptTab + "Replace string: " + cPromptTab + RawValue ;
DataType = cNoPromptList;
"" ;
"Value: " + cPromptTab + cPromptTab + @Text( RawValue ) ) +
cPromptNewLineTwo + "Would you like to continue?" );
@If( cEnableConfirmation ;
@Do(
@StatusBar( @Explode( tmpPrompt ; cPromptNewLineOne ; @True ) );
@If( @Prompt( [YesNo]; EditFieldPromptTitle ;
tmpPrompt );
"" ; @Return ( "" ) ) );
"" );

REM {Loop through selected docs taking each NoteIDList out of the list as it is processed};
DocUpdateCount := 0;
DocNavigationCount := 0;
@While( DocUpdateCount < @Elements( NoteIDList ) ; @If( @TextToNumber( @Text( @DocumentUniqueID ) ) != 0 ; @Do( NoteIDList := @Replace( NoteIDList ; @NoteID ; "" ) ; NotNoteIDList := NotNoteIDList : @NoteID; @For( ef := 1; ef <= @Elements( EditField ); ef := ef + 1; formulaResult := @Eval( DataTypeAction ); remark := " **REM** The values entered above will be applied to all selected doc. If data conversion doesn't work then don't set field."; @If( @IsError( formulaResult ); @Do( tmpPrompt := "Error with NoteID of " + @NoteID + ". Continue?" + cPromptTab + cPromptNewLineOne + cPromptTab + "Error: " + cPromptTab + cPromptTab + @Text( FormulaResult ) + cPromptNewLineOne + cPromptTab + "Formula: " + cPromptTab + cPromptTab + DataTypeAction + cPromptNewLineOne + cPromptTab + @If( @Contains( DataTypeAction ; "EditField[ef]" ) ; "EditField[ef]:" ; "Field:" + cPromptTab ) + cPromptTab + EditField[ef] + cPromptNewLineOne + cPromptTab + "Data type/action: " + cPromptTab + DataType + cPromptNewLineOne + cPromptTab + @If( DataType = ("Replace Substring":"Replace" ) ; "FromRawValue: " + cPromptTab + @Text( FromRawValue )+ cPromptNewLineOne + cPromptTab + "RawValue: " + cPromptTab + @Text( RawValue ) ; DataType = cNoPromptList; "" ; "RawValue: " + cPromptTab + @Text( RawValue ) ); @StatusBar( @Explode( tmpPrompt ; cPromptNewLineOne ; @True ) ); @If( @Prompt( [YesNo] ;"Error - " + EditFieldPromptTitle ; tmpPrompt ) ; ErrorNoteIDList := ErrorNoteIDList+ cArraySeparator + @Text( @NoteID ); @Return( @If( @Eval( cErrorCheckCode ) != "" ; @StatusBar( @Explode( @Eval( cErrorInformation ) ; cPromptNewLineOne ; @True ) ): @Prompt( [Ok] ; "Unable to Update - " + EditFieldPromptTitle ; @Eval( cErrorInformation ) ); "" ) ) ) ); @SetField( EditField[ef] ; formulaResult ) ) ); @If( DocNavigationCount > cMaxUpdatedDocuments ;
NoteIDList := "";
@Do(
DocUpdateCount := DocUpdateCount + 1;
@Command([NavNextSelected]);
@UpdateFormulaContext;
remark := " **REM** If we haven't processed all docs yet but the current doc is not in the NoteIDList list, keep looping ... if cnt exceeds MaxUpdatedDocuments assume infinite loop and stop ";
@If( DocUpdateCount < @Elements( NoteIDList ) & ( !@Member( @NoteID ; NoteIDList ) ) & ( !@Member( @NoteID ; NotNoteIDList) ); @While( (! @Member( @NoteID ; NoteIDList ) & DocNavigationCount <> 1; "s " ; " " ) + "on " + @Text( DocUpdateCount ) + " document" + @If( DocUpdateCount > 1 ; "s" ; "" ) + "." )



2007-05-05

Notes: How to update rich text in a document that's open and redisplay it without saving

«The code sample below shows how to write LotusScript code that makes changes to a rich text field in a document that the user is editing, and displays those changes immediately on-screen, without saving the changes. This also works if you need to repeat other operations that only occur when a document is opened, e.g. evaluating section editor formulas and computed subform formulas.

Here's the code, which should work in Notes 5.0.2 and higher:

Dim wksp As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument, uidocNew As NotesUIDocument
Dim doc As NotesDocument
Dim rti As NotesRichTextItem
Dim strFieldname As String

Set uidoc = wksp.CurrentDocument
uidoc.Refresh True ' do this if the rich text field is editable, to get the current contents in case user has modified them.
Set doc = uidoc.Document ' get the back-end document for the document open on screen.
strFieldname = uidoc.CurrentField ' remember the current field if any
Set rti = doc.GetFirstItem("fieldname") ' insert your fieldname here, generally "Body"

' Make your rich text changes here, for instance:
Call rti.AddNewLine(1, True)
Call rti.AppendText(Now & ": log entry.")
If session.NotesBuildVersion >= 190 Then
rti.Update ' ND6 only
Else
Call doc.ComputeWithForm(True, False) ' caution, as this may erase some field values if you have @Db functions in formulas.
End If

doc.SaveOptions = "0" ' make it possible to close the document without a "do you want to save" prompt. If this is a mail-in doc you may need to set MailOptions="0" also to avoid being prompted.
Call uidoc.Close(True)
Set uidocNew = wksp.EditDocument(True, doc, , , , True)
Delete uidoc
uidocNew.Document.RemoveItem("SaveOptions")
If strFieldname <> "" Then uidocNew.GotoField(strFieldname) ' return focus to field that was current before.

Note: this will cause Queryclose, Queryopen, Postopen (and so on) form events to trigger. Also, uidoc.Refresh will execute computed field formulas and input validations, so you should write the validation formulas to not return @Failure unless @IsDocBeingSaved | @IsDocBeingSent is true.»



in Notes/Domino 6 and 7 Forum

Notes: Design Synopsis in HTML format

«(...) But also, the Design Synopsis has never worked very well for large
designs ("Too many paragraphs") or for large blocks of LotusScript , whose code
does not appear in full. The most important limitation of the Design Synopsis,
though, in my estimation, is that the output is not customizable. (...) The
menu item Tools / DXL Utilities / Transformer... (...) it'll put up a
dialog very similar to the Design Synopsis dialog, with one important
difference: the opportunity to select an XML stylesheet (.xsl file) to transform
the DXL descriptions of the selected design elements into human-readable form as
an HTML file. »

in Best Practice Makes Perfect

2006-06-23

Windows (XP): Remove or delete a service

To remove a service on windows XP, use the following command:


sc delete "<service name>"

2006-06-06

Notes: How to access .Net classes from LotusScript

IBM Technote: How to access .Net classes from LotusScript

Problem
You have created an object using Microsoft .Net and would like to create and use this object within LotusScript. How can this be done?
 
Solution
To create a .Net DLL that is accessible from LotusScript perform the following steps:

1. Create a C# Class Library Project with the following code:

using System;

public class MyTest
{
public string AppendStr(string s)
{
return s + " from inside the DLL";
}
}

Note: A Visual Basic Class Library could also be created.

2. To access this DLL from anywhere on the machine you will also need to create this DLL as a shared assembly and publish the your DLL to the Global Assembly Cache (GAC). Otherwise, the DLL will be created as a private assembly and you will only be able to create the object if the DLL is in the same directory as the calling program.

      To create this DLL as a shared assembly you will need to generate a cryptographically strong name for the assembly. To do this start up the Visual Studio Command Line prompt, and enter the following command:

      sn -k c:\MyTest.snk

      This will create an Assembly Key File name at the location c:\MyTest.snk


3. Open the AssemblyInfo.cs file of the project include the following line:

      [assembly: AssemblyKeyFile(@"c:\\MyTest.snk")]

      Note: For Visual Basic you will need to include this tag instead: <assembly: AssemblyKeyFile(@"c:\\MyTest.snk")>


4. Build the project. This will build the project with the value of the Assembly Key File and allow it to be published as a Shared Assembly to the Global Assembly Cache.

5. Using the Visual Studio Command Line, change to the directory where the DLL was generated, then publish the DLL to the Global Assembly Cache using the following command:

      GacUtil /i MyTest.dll


6. To make the objects in this DLL accessible via the COM interface, enter the following command:

      regasm MyTest.dll


7. To access the object contained in this DLL using LotusScript use the following code:

      Dim obj As Variant
      set obj = CreateObject("MyTest")
      MsgBox obj.AppendStr("This is")

      The message box will display "This is from inside the DLL."


In short, once the shared assembly is published as a COM component, it can be instantiated in LotusScript using the CreateObject() function. With the exception of Step 7, all of the steps are all specific to the deployment process of Microsoft .Net components. For further information regarding any of these utilities you should refer to the Microsoft web site or Microsoft support.

2006-05-11

Notes: After logout, authentication is no longer possible

Symptoms:

User presses the login button/link, inserts username and password and gets authenticated. Later he presses the logout button/link, and he is successfully logged out. If he tries to login again, he's unable to because the authentication form is never presented again (unless he closes the browser window and re-opens it).


Possible Solution:

In case the login link is like this:

top.location.href = "/database_path?OpenDatabase&Login">

change it to:

top.location.href = "/database_path?Login&redirectTo=database_path?OpenDatabase">

2006-05-10

Domino: Session Authentication via Lotus Script

Or how to login on the web via a notes agent:

Print "<HTML>"
Print "<BODY TEXT=""FFFFFF"" BGCOLOR=""FFFFFF"" onLoad=""document.forms[0].submit()"">"
Print "<FORM METHOD=post ACTION=""/names.nsf?Login"" NAME=""_AlfaLogin"">"
Print "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0//EN"">"
Print "<HTML>"
Print "<INPUT NAME=""Username"" VALUE=""" + sUsername + """ TYPE=hidden maxlength=256>"
Print "<INPUT NAME=""Password"" VALUE=""" + sPassword + """ TYPE=hidden maxlength=500>"
Print "<INPUT NAME=""RedirectTo"" VALUE=" + sRedirectTo + " type=hidden>"
Print "</HTML>"
Print "</FORM>"
Print "</BODY>"
Print "</HTML>"

2006-05-09

Notes: View doesn't refresh

Symptoms:
  • permanently shows the Refresh Icon
  • the "NoCache" parameter on the dblookup "doesn't work"
  • the view.Refresh statement doesn't refresh the view

Problem:

The view probably uses @Now or @Today formulas in the Selection Formula or in a column, which prevents the view's index to be updated (it's always out-of-date as these formulas force the calculation to go to the minute:second detail).


Solution:

Use this formula instead: @TextToTime("Today") - it calculates only to the year-month-day so that the index only updates once a day.