Tutorial One-to-Many DataPages Note: A new and easier way of building one-to-many DataPages is under development, but for now, here’s how you can create great relational apps, without much effort. December 2009
End Results One-to-Many Details Page 2 Contact History is a child of Customers table. On the details page Customer’s info is shown plus their Contact History and a web form to submit new Log for this customer.
Tables Structure 3 Customers table is primary and CustIDis it’s unique ID field. Call_Logis a the child table and CustIDis the record ID from the parent table. It creates a relationship with the parent table. Note the data types.
DataPages in Details Page 4 Three related DataPages will be configured for deployment into a single Details page.
Search and Results DataPage – 1 of 4 5 Instead of the standard details page, we pass CustID(Customer ID) to a separate web page where the 3 DataPages are deployed. Search Form Results Page Details Page CustID=x Two screens of a Search and Report DataPage Separate Details page
Search and Results DataPage – 2 of 4 6 Enable Advanced Options and Parameters
Search and Results DataPage – 3 of 4The Key Step 7 2: See below 3: Insert the ID as a parameter on the link 1. Insert an HTML block Step 2: Enter HTML link to where your details page will be deployed. Link should be in the format pagename.htm?ParamName=[@field:FieldName] In this example we use < a href=“details.htm?CustID=[@field:CustID]”>Details</a> pagename.htm: Page name or extension doesn’t matter, but this is the page where the other 3 DataPages should be deployed in.
Search and Results DataPage – 4 of 4 8 Disable the standard details page
Customer Details and Customer Contact History DataPages – 1 of 4 9 Enable Advanced Options and Parameters
Customer Details and Customer Contact History DataPages – 2 of 4 10
Choose Pre-defined criteria to avoid a search form
Enable Parameters so this DataPage can receive CustID
Choose Bridge and external parameters because the CustID will be passed as a query-string value
Customer Details and Customer Contact History DataPages – 3 of 4 11
Select CustID as the only filtering field
Configure CustID by selecting the Advanced tab and enabling Receive parameter
Customer Details and Customer Contact History DataPages – 4 of 4 12 Customer Details DataPage: Select Direct to Details and configure the Details page as you wish. Customer Contact History: Select Tabular and configure the Results page as you wish, without a details page.
New Log Web Form– 1 of 4 13 Enable Advanced Options and Parameters
Set CustID to Hidden and in Advanced tab enable Receive parameter. This will automatically stamp customer ID with every New Log submission.
New Log Web Form– 1 of 3 15
Set the next step as load the Same form
Deployment 16 Deploy the following to your Details Page: Customer Details Customer Contact History New Log Web Form Make sure the name and location of this page matches the link you entered in the HTML block of Search and Report. Deploy the Search & Report DataPage