Click here to load reader

One-to-Many relational Web Application

Embed Size (px)

Citation preview

One-to-Many Apps in Caspio Bridge

TutorialOne-to-Many DataPagesNote: A new and easier way of building one-to-many DataPages is under development, but for now, heres how you can create great relational apps, without much effort.

December 2009

1

End Results One-to-Many Details Page2

Contact History is a child of Customers table. On the details page Customers info is shown plus their Contact History and a web form to submit new Log for this customer.

Tables Structure3

Call_Log is a the child table and CustID is the record ID from the parent table. It creates a relationship with the parent table. Note the data types.Customers table is primary and CustID is its unique ID field.

DataPages in Details Page4

Three related DataPages will be configured for deployment into a single Details page.

Search and Results DataPage 1 of 45

Instead of the standard details page, we pass CustID (Customer ID) to a separate web page where the 3 DataPages are deployed.Search FormResults PageDetails PageTwo screens of a Search and Report DataPageSeparate Details pageCustID=x

Search and Results DataPage 2 of 46

Enable Advanced Options and Parameters

Search and Results DataPage 3 of 4The Key Step7

1. Insert an HTML block2: See below3: Insert the ID as a parameter on the link

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]>Detailspagename.htm: Page name or extension doesnt matter, but this is the page where the other 3 DataPages should be deployed in.

Search and Results DataPage 4 of 48

Disable the standard details page

Customer Details and Customer Contact History DataPages 1 of 49

Enable Advanced Options and Parameters

Customer Details and Customer Contact History DataPages 2 of 410

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 411

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 412

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 413

Enable Advanced Options and Parameters

New Log Web Form 1 of 414

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 315

Set the next step as load the Same form

Deployment16Deploy the following to your Details Page:Customer DetailsCustomer Contact HistoryNew Log Web FormMake 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