- 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.
// Ouverture de la connexion IDConnexion is int IDConnexion = NotesOpenConnection("MotDePasse", "ServeurMars", ... "C:\Users\Julie\AppData\Local\Lotus\Notes\Data\user.id") // Spécification de la base Lotus Notes à utiliser IDBase is int IDBase = NotesOpenDatabase(IDConnexion, "julie.nsf") ... // Activation de la vue NotesActivateView(IDBase, "MesClients") // Cette vue contient les colonnes "Nom", "Prénom", "Age" et "Ville" // Seules les colonnes "Nom", "Prénom" et "Ville" sont triables // Recherche dans cette vue des personnes dont le nom commence par "Mar", // le prénom par "Jean" et la ville par "Saint" NotesViewSeekFirst(IDBase, notesStartsWith, "Mar", "Jean", "Saint") // Parcours des personnes trouvées WHILE NotesOut(IDBase) = False ... // Traitements NotesDocumentNext(IDBase) 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 Identifier of session to use. 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 performed with the NotesViewSeekFirst function is performed only 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…
|
|
|