Notes DB - Mapping (Magic xpi 4.13)
After you have completed the connection and clicked OK, the Mapper screen will open letting you choose the connection, operation and a specific view or form based on the operation selected.
Clicking OK will do the following:
-
Build the XSD based on the operation and saves it under the component at: XSD\<Connection Name>\Form|View\<From\View name>
For example: XSD\conn1\View\myView.xsd
-
Do one of the following based on the operation selected:
-
Query: Opens the Data Mapper screen with the View XSD containing a Query compound. The compound is constructed from four elements, which allow the developer to query based on:
-
-
UniversalID: Query for a specific document based on its UniversalID value.
-
NotesID: Query for a specific document based on its NotesID value.
-
Search: Query using Notes query syntax. The search can return multiple results. For more information about possible search strings, click here.
-
FullTextSearch: Query using a search string (not bound to any specific search syntax). The search can return multiple results.
-
Update: Opens the Mapper screen with the Form XSD and allows definition of field values. An ID value will have to be mapped to either the UniversalID or the NotesID elements in order to identify the updated document.
-
Add: Opens the Mapper screen with the Form XSD and allows definition of field values.
-
Delete: Opens the Mapper screen with the Form XSD. An ID value will have to be mapped to either the UniversalID or the NotesID elements in order to identify the deleted document.
-
Global Query: Opens the Mapper screen with the Query element since the returned document structure is unknown. You will have to map a value to one of the options in the Query section.
For the Add, Update, and Delete operations:
All Forms XSDs have a Form element under the Fields compound. If the form has aliases, one of the alias names will have to be used for the Form element value. If no aliases are available, the form name will have to be used as a value for the Form element in the XSD. To find the form aliases, when choosing a form from the list, check the Aliases section in the lower part of the Forms List.
Notes DB fields that accept arrays of string values can be updated in Magic xpi by using the following syntax: "val1","val2","val3". Furthermore, in querying these Notes DB string fields, Magic xpi returns the value in the same "val1","val2","val3" syntax.
|
Filling in the Form element is mandatory.
|
All View XSDs will have a Search element under the Query compound. This field will be used for the Notes syntax query when the Query operation is selected in the Component Configuration dialog box.
All View XSDs will have a UniversalID element and NotesID element under the Query compound. Each of these fields can be used for the Notes document ID when the Update and Delete operations are selected in the Component Configuration dialog box.
The Notes DB connector lets you perform search and filtering operations. There are certain issues that you need to be aware of when doing this.
-
The value that you are searching for should only be specified in either the Search field or the FullTextSearch field, but not in both of them.
-
During the execution of the search, first preference is always given to the Search field. If no result is returned from this field, the FullTextSearch field is then checked.
-
If you specify a value in the Search field, it will only be applied to the whole Notes DB database and not on the selected View.
-
If you specify a value in the FullTextSearch field, it will only be applied to the selected View.
|
-
If you know that your query will only be executed on View, you can remove the value in the Search field and then change its syntax to the FullTextSearch field syntax. A FullTextSearch overrides the Search criteria.
-
You cannot use formulas when performing a FullTextSearch. Click here for additional information about the correct syntax to use.
|
Search Field Examples
-
To search all documents in the Notes DB mail database whose Subject line contains the word ‘test’, specify the following in the Search field:
@Contains(Subject;"test")
-
To search for documents in the Notes DB mail database whose Subject line contains the word 'Vish' and whose Form type is 'Memo', specify the following in the Search field:
@contains(Subject;Vish) & Form="Memo"
-
To negate (!=not) a function, enter the following in the Search field:
!@Contains(Subject;"First")
-
To search for a document containing one of two different criteria, enter the following in the Search field:
@Contains(Subject;"Delete")| @Contains(Subject;"test")
-
To search for a document containing two specific criteria, enter the following in the Search field:
!@Contains(Subject;"Delete") & @Contains(From;"John")
-
Additional examples of OR and AND together include the following (note how the operators are grouped together with brackets):
-
-
@Contains(Subject;"Delete")| (@Contains(Subject;"test") & From="CN=santosh burande/O=msei")
-
(@Contains(Subject;"Delete")| (@Contains(Subject;"test")) & From="CN=santosh burande/O=msei"
-
@Contains(Subject;"Delete")| (@Contains(Subject;"test") & From="CN=santosh burande/O=msei")
-
You can also use certain functions in the formula, as shown below:
-
For more information on these functions, click here.
FullTextSearch Field Examples
-
To search only the Inbox view in the Notes DB database for a Subject line containing the word ‘test’, you should specify the following in the FullTextSearch field: FIELD subject CONTAINS "test*"
-
To search for a document containing one of two specific words, enter the following in the FullTextSearch field:
"Vish"|"Test"
-
To search for values in specific fields, enter one of the following in the FullTextSearch field:
-