|
|
|
|
|
- Search performed in the columns of a view
- DateTime columns
NotesViewSeekFirst (Function) In french: NotesVueCherchePremier Seeks the first 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. // 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" NotesViewSeekFirst(DatabaseID, notesStartsWith, "Mar", "John", "San") // Browse the customers found WHILE NotesOut(DatabaseID) = False ... Â // Processes NotesDocumentNext(DatabaseID) END
Syntax
<Result> = NotesViewSeekFirst(<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 the DateTime columns, if the sought value corresponds to a character string, this string 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 the DateTime columns, if the sought value corresponds to a character string, this string 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 the DateTime columns, if the sought value corresponds to a character string, this string 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 NotesViewSeekFirst 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|