# The Database Search Bar

You can search for content in rows by entering the data in the search bar at the top of the window and pressing the Enter key. You can search for previous or next matches by clicking on the previous and next buttons to the left of the search bar.

The search bar is also used to filter the list of rows which are displayed. Enter the filter data in the search bar and click on the filter button to the right of the search bar. Only rows which contain the specified data will be displayed. You can filter again by changing the filter data and clicking on the Filter button again. Note that the filter button changes to a filter with a green plus sign so that you know when you are adding to the filter. All filters are removed by clicking on the filter button with the red X.

Typically the search panel consists of a single row. In this configuration all fields are searched/filtered and the search is case insensitive.

If you click on the small triangle control at the extreme right of the search panel, you will add additional functionality to the search and filter functionality. These options are again hidden by clicking on the triangle control again.

You can replace occurrences of the text in the search bar in cells by using one of the Replace All or Replace in Selection buttons. Replace All will search and replace in all visible rows and columns. ie. filtered out rows and hidden columns are not searched. Replace in Selection will only process rows which are selected.

The following additional options are used when the search panel is expanded:

Match Case
  By default alphabetic case is ignored when searching, filtering or replacing. When this option is specified, alphabetic case is significant.
Whole Words
  By default, text can occur anywhere in a field when matching. When this option is set only whole words will be matched. When this option is set a matched pattern is discarded if the first character in the search pattern is alphanumeric and the character preceding the match is alphanumeric, or if the last character in the search pattern is alphanumeric and the character following the match is alphanumeric
First
  This option is only used when replacing. By default, if multiple occurrences of the search bar text is found in a cell, they are all replaced. When this option is set, only the first occurrence is replaced.
Editable
  This option is only used when searching or filtering. When set, fields which are not editable are ignored when matching. Note that this option is implicitly set when replacing.
Visible
  This option is only used when searching or filtering. By default hidden columns are searched. When this option is set, hidden columns are not searched. Note that this option is implicitly set when replacing.

Rows which are not displayed due to filtering, are never used by searching, filtering or replacing.

When searching or filtering all rows and columns are typically searched. Non editable columns can be excluded by means of the Editable option. Hidden columns can be excluded by means of the Visible option.

When replacing, only those cells which are editable and not hidden are searched. Replace All will search and replace in all rows available in the current filter or all rows if no filter is active. Replace in Selection will only process rows which are selected.

If you want to easily see which rows contain content modified by a replace, filter on the search bar text prior to performing the replace with the Editable and Visible options set.