Searching for Data in a Papyrus Base Database

Search Entry in the Main Table Window

For an easy search, such as for a name, you can simply enter it in the search field. For more complicated queries, you can also use relational operators to limit your search results.

The sequence in which you enter your search terms is irrelevant.

Say you are trying to find a certain Mr. Smith in your database. Since most of the time there is more than one “Smith” listed, it makes sense to also search using his first name.

You can simply type the following into the Papyrus Base entry field:

“John Smith”

or

“Smith John”

Your search results will display all records that have both the word “Smith” and the word “John.”

A space or a comma between two words will be interpreted by Papyrus Base as a logical “AND.”

By the way, each time you type a new letter, the entire database will display only those results that match what you have typed in the search field. This means, if your address database is not very large, simply typing “Jo Smi” will be enough to find the “John Smith” you are searching for.

For more about the syntax for “real” relational operators such as “AND” and “OR”, see the Syntax for Queries.

If relational operators are being used in your query, the icon (Interpret Input as a Query Expression) will be turned on.

If you enter more than one search term in your query, Papyrus Base will search again in all the data fields (each data field can be restricted using the dialog “Field Properties”). Spaces and commas between words will be interpreted as an “AND.”

If you would like to define your search even further, you can use the “Extended Search” .

Queries can be saved for later use: the search field is also a drop-down menu and by choosing the “Store Query” option, you can save it for other queries in the future. The option “Edit Stored Queries,” which is also found in the drop-down menu, can be used to sort and delete any of your stored entries.

Button “Interpret Input as a Query Expression”

When you enter a string into the search field and Papyrus Base finds a relational operator (e.g. “Cook OR Cooke”), then this icon will automatically be turned “on” and will show you that your search will be conducted according to the relational operators present.

When this icon is turned on, it will show you how Papyrus Base is interpreting your query. If it turns on, you can see that the relational operators you have entered to modify your search are being used. Sometimes, though, you will actually want to search for one of the words used as a relational operator. If, for example, you want to search for a company called “Williams and Sons,” Papyrus Base will interpret the “and” in the company name as the relational operator “AND,” which you can see when the icon is activated. If you would actually like to search for the word “and” and not use it as a relational operator, you can simply click on the icon and turn it off again, which tells Papyrus Base that you would like to search for “Williams and Sons,” instead of “Williams AND Sons.” This icon can be turned on and off as you like, simply by clicking on it.

“#” in the Entry Field for Extended Formulas–Normally, you can only use limited formula syntax in the toolbar search field, in order to avoid conflicts with string searches.

This means that mathematical constants + – * / are not possible, but functions such as LEFT(Name, 2)=’Ax’ are.

Important Tip: At the bottom of the window in the info bar you can see exactly how Papyrus Base is interpreting your entry.

If you add ‘#’ before your formula, you force Papyrus Base to interpret your entry as formula syntax, e.g.
#Sum1 > Sum2 * 2
This also means that all strings must be surrounded by quotation marks, and the text search for “John Smith” will become
*=’John’ AND *=’Smith’

Extended Search Dialog – as soon as you open the “Extended Search” dialog, your current query will appear here, if possible in the “Schematic Query,” and if not, in the “Expert Query.” If an expert query is used, the text query will be converted to formula syntax, such as in the example above.

Search Term Syntax

When you enter a term in the search field, it will be automatically interpreted as the beginning of a word. Thus, if you enter “Mueller” in the search field, you will be shown all records that start with “Miller,” including “Millerer.” What will not be found, however, is the record “Lomiller” because “Miller” is not at the beginning of the word. Whether Papyrus Base ignores or uses the case in which the term is written, depends on whether the case-sensitive button (“A not equal to a”) in the toolbar is turned on or off.

You can, of course, search for parts of words that appear in the middle (syntax for this is listed below).

If you want to limit the search to a certain data field column, you can use relational operators after the syntax <Datafield><Relationaloperator><Searchterm>. You can determine which part of the word will be searched (beginning, parts of words, entire words, etc.) by using the relational operators and in which area of the current data field (a word, an entire field) will be searched.

<Datafield> (or, for short, “Field”) is the field name (or column name). Lowercase and uppercase will not be differentiated. Instead of the field name, you can also use “*” to search all fields.

<Searchterm> (or, for short, “Value”) is a string that is surrounded by single or double quotation marks. As long as your search terms only consist of normal letters and numbers, you can leave the quotation marks out.

The following special characters also have a special syntactical function. Thus, strings that contain them need to be set off in quotation marks:

<space>, <comma>, <single quotation marks>, <double quotation marks> as well as the characters & | ! ( ) < > = : ~

The following words are also reserved for syntax and should be set in quotation marks if you would like to search for them:

NOT / AND / OR / XOR / EXCLUSIVEOR

You can see exactly what these words do in our table Search Queries and Conditional Calculations.

Extended Search With Multiple Search Terms

The search field in Papyrus Base’s toolbar is best used for simple search queries; if you want to carry out a search query that is a more complex, such as one with more than one search term and logical operators, we recommend using the “Extended Search” dialog.

This dialog can be accessed either in the “Edit” menu or by clicking on the magnifying glass icon in the toolbar of the table window.

For most queries you will want to use the “Schematic Query” tab. Each line in this dialog can be defined by a search term for a specific field. The “More” button will create another line for your search and the “Fewer” button allows you to delete lines you no longer need.

Each search term is linked to the next via the first drop-down menu (starting at line 2). “and” links mean that the query will display all results that meet the search criteria for both lines; an “or” link means that at least one of the search lines has to be found.

Please be aware that an “and” link will apply first; an “or” link will separate all “and” links above and below it.

The drop-down menus under “Field” contain all data fields available in your database. The comparison operators are the same as for the search entry field in the main window.

The drop-down list at the bottom of the dialog has the option “Exact Match (Case Sensitive)” which means that lowercase and uppercase letters will be used in the search query. This menu also has other options, such as “UPPER=lower case,”  “Ignore Accents (á=a, é=e etc.) and Umlauts (ä=ae, ß=ss etc.),” and “Phonetic Similarity Search”. The latter is a useful search option when you don’t know exactly how to spell the term you are searching for (the icon in the table window can also be used).

The “Expert Query” tab is useful when your search queries are longer than what fit in the entry field of the main table window; here you have the option to simply click on the search elements you would like to select. Otherwise, the entry under “Query” functions just like the entry field of the main table window.

The search term itself, though, must be surrounded by quotation marks in this dialog tab.

It is also possible to toggle between the entry field in the main window and the “Expert Query” tab of the “Extended Search” dialog.

The “New Search” button will clear all search criteria and prepare the dialog for you to carry out a new query (similar to the “reset” button in the toolbar of the main table window). “Find” will start the search and “Close” will close the dialog.

Last updated by on October 29, 2019