ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Lotus Notes functions / Notes functions
  • Search performed in the columns of a view
  • DateTime columns
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Seeks the last document found in the current view in Lotus Notes. This search is performed in the sortable columns of the current view.
The search is performed by finding out whether each specified value corresponds to the value found in the corresponding sortable column. The document found corresponds to the document containing all the specified values.
The current view was specified by NotesActivateView.
Example
// Open the connection
ConnectionID is int
ConnectionID = NotesOpenConnection("Password", "MarsServer", ...
"C:\Users\Julia\AppData\Local\Lotus\Notes\Data\user.id")
// Specify the Lotus Notes database to use
DatabaseID is int
DatabaseID = NotesOpenDatabase(ConnectionID, "julia.nsf")
...
// Activate the view
NotesActivateView(DatabaseID, "MyCustomers")
// This view contains the "LastName", "FirstName", "Age" and "City" columns
// Only the "LastName", "FirstName" and "City" columns can be sorted
// Find in this view the customers whose last name starts with "Mar",
// whose first name starts with "John" and whose city starts with "San"
NotesViewSeekLast(DatabaseID, notesStartsWith, "Mar", "John", "San")
// Browse the customers found
WHILE NotesOut(DatabaseID) = False
...   // Processes
NotesDocumentPrevious(DatabaseID)
END
Syntax
<Result> = NotesViewSeekLast(<Session identifier> , <Search mode> , <Sought value 1> [, <Sought value 2> [... [, <Sought value N>]]])
<Result>: Boolean
  • True if the search was performed,
  • False otherwise. If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Session identifier>: Integer
Session ID to be used. This identifier is returned by EmailStartNotesSession or NotesOpenDatabase.
<Search mode>: Integer constant
Type of search to perform:
notesEqual"Exact-match" search.
notesGreater"Strictly greater than" search.
notesGreaterOrEqual"Greater than or equal to" search.
notesLess"Strictly less than" search.
notesLessOrEqual"Less than or equal to" search.
notesStartsWith"Starts with" search.
This constant is available for the string columns only.

For the string columns, the search always ignores the case and the accented characters.
<Sought value 1>: Type of the column in which the search is performed
Value sought in the 1st sortable column found. This value is automatically changed into the type of the current column (Text, Number or DateTime).
For DateTime columns, if the search value is a string, it must have one of the following formats: "YYYYMMDD", "YYYYMMDDHHmmSS" or "YYYYMMDDHHmmSSCCC".
<Sought value 2>: Type of the column in which the search is performed (optional)
Value sought in the second sortable column found. This value is automatically changed into the type of the current column (Text, Number or DateTime).
For DateTime columns, if the search value is a string, it must have one of the following formats: "YYYYMMDD", "YYYYMMDDHHmmSS" or "YYYYMMDDHHmmSSCCC".
<Sought value N>: Type of the column in which the search is performed (optional)
Value sought in the Nth sortable column found. This value is automatically changed into the type of the current column (Text, Number or DateTime).
For DateTime columns, if the search value is a string, it must have one of the following formats: "YYYYMMDD", "YYYYMMDDHHmmSS" or "YYYYMMDDHHmmSSCCC".
Remarks

Search performed in the columns of a view

A view contains one or more sortable columns. The search started with NotesViewSeekLast is only performed in the sortable columns of the current view. No search can be performed on a non-sortable column. Furthermore, no sortable column can be ignored.
For example:
  • the view "A" contains the columns 1, 2 and 3. These three columns are sortable columns. A search can be performed on column 1, on columns 1 and 2 or on columns 1, 2 and 3. No search can be performed on columns 1 and 3, on column 2 or on column 3.
  • the view "B" contains the columns 1, 2 and 3. The columns 1 and 3 are sortable columns. A search can be performed on column 1 or on columns 1 and 3. No search can be performed on columns 1 and 2, on columns 1, 2 and 3, on column 2 or on column 3.

DateTime columns

The "Exact-match" searches (notesEqual constant) performed in the DateTime columns may return incorrect results. Indeed, the precision of the value stored by the column may exceed the precision of the sought value.
Component: wd300mess.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help