How to create and edit a Query page

Search functionality in Sapphire is typically used to locate one or more records in order to modify the data. The Query page element1 enables users to perform a search in order to generate a result set (all the objects at a particular location, for instance), and to save the results to PDF.

When used, the Query page element is the only element on a Form (it cannot be combined with any others):

Query Form

The Programme Lead configures a Query page element to:

  • search one or more fields in a specific module;
  • return a maximum number of results; and
  • list data from one or more fields.

When a Programme Lead accesses a project, any Forms, Editors, Statistics tools and Query pages already created will be listed, along with options to edit, delete and add new instances of them, e.g.:

To build a new Query page, click in the Queries section. The Query creator displays:

Query editor

Here you configure a Query page, assign permissions to users (specify who can use this specific Query page; who can modify it).

To edit an existing Query page, click Edit beside a Query page's title. The Query page will open ready for editing.

In this example, we create a Query Page that searches Summary Data in the Catalogue module; only records where Object category = Painting will be returned to a maximum of 25 records; the result list will display the IRN, Summary Data and Main Title of the returned records, sorted in reverse alphabetical order by Main Title.

5. Save the Query page.

In this example, Summary Data is searched for a user's search term and only records where Object category = Painting will be returned; the result list will display the IRN, Summary Data and Main Title of the returned records, sorted in reverse alphabetical order by Main Title:

Search results