neatComponents: website development system
Search 
spacer
spacer
Previous pageThe Guide Next page
Creating Queries 

Introducing two important concepts: Queries and Embedded Views

In the previous example we took the data collected on a Form and emailed it out of the neatComponents website. Here, we are going to use nC to manage the data within the website.

The example is a trivial one - but it will introduce you to the methods of data and display manipulation that are used in the most sophisticated of constructions. The 'Query' enables us to look at the data collected from the Form, and the Embedded View allows us to display that information on the website.

We will display the list of visitors to the website and their email addresses on the currently blank 'Section 2' of the trial website.

Creating a Query

Add a Query to the website. We don't need the Query to show in the navigation - a visitor will never use it directly - so place it in the Admin section, at the bottom of the tree.

Tip:   When working on 'real sites' you will often have many Queries.  
To make it easy to keep track of which one you are working with follow a naming convention, such as Q: Email

Open the Query in a new window. Right-click in the upper area of the Query as prompted, and [Add Table] Then select the Email 'Form' - it is probably the only item offered.

Add the Fields from the Email 'Form Table' to the Query window - you can click-and-drag or simply double-click. If you want to change sequence or remove a Field you can select the field by the gray header-bar and use the controls to the right to change position or remove a column.

The Field will 'Show' by default, but you will need to enter the Title for each field to be displayed on the page. We will want the output to be displayed on the page in Ascending order by 'Last Name', so click in the 'Sort' cell and choose 'Ascending' from the drop-down list.

Let's now Define the View that nC uses to display the results of the Query.

 


More information:

In this example we are going to be embedding the output from all of the columns in this query on the same page - Section 2 of the website - so the Link Target is the same for each column.  It is very often the case that you will want to display query outputs on different pages - that is why they are set individually.

spacer
A first site