You are here: Elements Reference > Miscellaneous Elements > Query-by-example Element > Query by example Example

 

Query-by-Example Element Example

To use the Query-by-Example Element, you will need to create an instance of the Element on a page where a user can query the data, and also place an instance of the Element on a results page, where the results of the query will display. You should first create the page on which you want the results to display, and then create the page where the user will query the data. An example is helpful.

Assume that you want to create a page that allows users to query past sporting event data so that they can see games that were won or lost, and against which teams.

First, create a page on which you want the results of the user’s query to be displayed. (You will later return to this page to add an instance of the Query-by-example sporting event in order to display the results). After you have created the page, navigate to the page on which you want the user to be able to query the sporting event Element.

The Query-by-example Element is accessible in the Element Gallery under Search Elements. In author mode on the page where you want the user to query the data, place it on a page, and select the simple form, custom metadata, or custom Element data you want the user to be able to query.

Click on the ghost text to select the Query-by-example source form, as shown below.

Select the simple form, custom metadata, or custom Element, and click Next to display the Select Form Fields dialog. Select the fields for users to query.

For data entered using a dropdown list, you can either display only the values for which data exists or all dropdown values. In the example above, there may be more blogs in the selection list than there are actual values; you can decide whether to display all of the blogs, or just the blogs containing records.

 

Related Links

Define Query-by-example Form Action

Filtering Query-by-example Results


You can download PDF versions of the Content Contributor's, Administrator's, and Elements Reference documents from the support section of paperthin.com (requires login).


For technical support:

http://www.paperthin.com/support/