- Before you begin to create the DataPages, create the webpage that will host the results page. This way, the URL is ready to be referenced when you create the search page. The search page can be deployed on as many web pages as needed.
Steps for separating a search page and a results page:
Create the search page (Submission Form)
In this section, you first create a search page by using a Submission Form.
On the DataPages’ listing screen, click New DataPage to open a DataPage wizard.
Although this DataPage will serve as a search page, select Submission Form as the DataPage type. You are going to collect the search criteria using this DataPage and then pass it directly to the results page (a Gallery Report DataPage) which will do the actual work.
On the DataPage DataSource screen, select the table you’d like to search as your data source.
Proceed to the Select Fields screen. Select one field and move it to the right-hand panel using the arrow button. To continue, click Next.
Prepare the Virtual fields
On the Configure Fields screen, create Virtual fields to collect the search data from the end-user. Virtual fields are used because we don’t want to run the search in this form. We also don’t want to create a new record using this form. In fact, this form is only for collecting data and passing it on. Add as many Virtual fields as you need to run your search. If you are using criteria in your search, you will need to include a separate Virtual field for each, for example, one field for minimum price, another field for maximum price.
In the DataPage Elements section, delete all non-virtual fields.
Please remeber that in order to edit this DataPage, you need to repeat steps where you select the fiels.
Configure each Virtual field:
Modify the field label to reflect the data you’d like to collect.
Click on the Advanced tab.
Click the On exit, Pass field value as parameter checkbox.
Rename the field parameter to match the data that’s being collected. Be sure to use the parameter format: [@xxxxx]
Note the parameter name to receive the data in the results page.
Repeat for all the Virtual Fields.
Set the destination to the results page
In the Destinations and Messaging screen click on Go to a new page. Enter the URL from the results webpage. Be sure to include the protocol (http:// or https://). Now, no matter where the search page is deployed it will direct end-users back to this URL. Click Finish to save your DataPage.
Create the results page
From the DataPages’ listing, click New DataPage. This time, create a Gallery Report DataPage to receive the parameters from the search page, perform the search, and display the results to the end user.
By default, the cursor selects Submission Form as the first DataPage type. Select Reports on the left menu and click Gallery.
On the DataPage DataSource screen, select the table you are searching as the data source.
On the Search Type screen, check Filter data based on your pre-defined criteria.
On the Select Filtering Fields screen, move all of the search fields to the right-hand panel using the arrow button.
Receive the parameters
Next, you configure the search fields to receive the parameters on the Configure Filtering Fields screen. Configure each DataPage element to receive the corresponding parameter data from the original search page.
For each DataPage element, click the Advanced tab.
Select External Parameter from the On load option and enter the parameter name exactly as it was entered in the search page.
Be sure to use the parameter format: [@xxxxx].
From the radio buttons available, check If empty, ignore criteria. This way if an end-user leaves one or several options blank, they will still be able to see results.
Repeat this for all search criteria.
Complete the results page and details page as normal.
Deploy the DataPages
Next, you can deploy both DataPages. Now that the DataPages have been configured you can deploy them to your web pages. Click Deploy, choose the Deployment Method and Security Settings for the DataPages. Copy the snippet created, and paste it directly into your web page’s HTML. Click Close on the deploy screen.
Testing and formatting
Once the DataPages have been deployed it is a good idea to perform searches using every available field to be sure the results are as expected. If you are having trouble with any particular field be sure that the parameter names in both the search page and the results page are exactly the same.
Once you are happy with the functionality of the separate search and results pages you can take a few minutes to improve the look and feel of the DataPages.