In Action: Results and Details in Two Separate Web Pages
You can separate your results and details pages into two different web pages. This article takes you through the process of creating a separate DataPage for results and details pages and connecting the two DataPages using a hyperlink with a query string parameter. Your base table must include a unique ID field such as an AutoNumber.
Steps to creating separate results and details pages
1. Create a Details Report
In the Caspio Bridge Explorer window go to the DataPages view. Click on the New button to open the DataPage wizard. Choose Reports and select the Details Report DataPage type. Click Next. Choose your data source, DataPage name, Style & Localization. Be sure to enable advanced options and parameters. Click Next.
Select “Filter data based on your pre-defined criteria” and check “Allow parameters in search criteria”. Then select the Bridge and external parameters radio button.
Click Next. Using the arrow buttons, move your unique ID field to the right-hand panel. Click Next. In the Advanced tab configure the field to receive a parameter named after the fieldname. In this example are fieldname is Unique_ID.
Now you can configure your details page as normal. Deploy your Details Report to a web page and be sure to note the host URL as you will need it later.
2. Create a Tabular, Gallery or List Report
Create a new Report and select Tabular, Gallery or List. Click Next. Be sure to enable advanced options and parameters.
You can set up your search and results pages as normal.
3. Create a hyperlink to the Details Report
Before moving past the Configure Results Page Fields screen we are going to create a link to the Details Report. Using the Insert button at the lower right-hand corner of the DataPage Elements panel insert an HTML block. In the HTML block create a hyperlink to the URL of the Details Report’s host page. At the end of the host page’s URL add a query string that passes the parameter for your record’s unique ID.
Here is a reference for the hyperlink you will need to create:
- Replace URL with the host page URL.
- Replace Fieldname with the fieldname of your unique ID field.
For Example: <a href="http://www.yourdomain.com/page.htm?Unique_ID=[@field:Unique_ID]">Details</a>
Click Next. The rest of the Results page can be formatted as normal. Select No Details Page when prompted. Click Finish to save your DataPage, and deploy this details page as normal. Now when your user clicks on the details link they will be redirected to the second webpage and see the correct record details.