Previous Topic  Next Topic 

This is enables you to link questionnaires together.

The purpose of the Link

The link enables us to create complex, multi-relational databases. Typical PocketSurvey questionnaires produce a two-table data model, with the tables connected in a simple one-to-many relationship.

Although this model is sufficient for the vast majority of survey types, there are certain survey types that require a more complex data model. A typical example may be an educational campus survey. Here the campus contains several buildings. Each building contains one or more rooms, which themselves contain many building elements. The campus may also have several grounds that are to be surveyed too. This requires a multi-relational model:

Where to use the link

Each pair of one-to-many entities can be created by a PocketSurvey questionnaire. So we could implement the whole model by creating four separate questionnaires:

Each questionnaire would be linked at the point where the ellipses overlap, e.g. the Campus questionnaire will have a link to the Building questionnaire. As the Building is at the 'many' end of the relationship we need to make sure that its destination is set to the child data file. Although it is not shown on the above diagram, the Campus to Ground link can be implemented in the Campus questionnaire simply as another link.

Building the model

    1. Start by designing the 'root' questionnaire - in this case Campus. (The root questionnaire will not be at the many end of any relationships.)
    2. Save the current questionnaire.
    3. Insert a Link question at an appropriate point.
    4. The link question will usually be preceded by a question that gets a value for the secondary key from the user. The secondary key is added to the end of the questionnaire's Identifier (with an optional delimiter in-between) then passed to the linked questionnaire. This compound key will be used as the unique identifier by the linked questionnaire - this is how we can tie the two questionnaires together.
    5. Type in the name of the questionnaire to which you are linking, then click the edit button.

    1. A second instance of PocketSurvey will be started and you will see the following dialog

    1. Click Yes to create a new questionnaire.

Repeat from 2 to insert further links.

Implementing the model in this way will produce a directory structure in which all the subsidiary questionnaires are sub-folders under the main questionnaire, e.g.

Once your linked questionnaires are structured in this way it allows PocketSurvey to manage the whole system as one. Any communications such as Send or Receive can be controlled from the root questionnaire - Campus in the above example. If we send Campus to the handheld then Building, Room, and Grounds will be sent as well. A similar thing happens when receiving data.

What happens on the handheld

At run-time PocketSurvey will open the linked questionnaire and start asking questions.

When the user comes to the end of the linked questionnaire they will not be asked to confirm that they wish to quit. Instead, the linked questionnaire will close and the calling questionnaire will continue.

Advanced Features

This is an advanced question type that is only available if you have purchased an enterprise or advanced license for PocketSurvey

HandHeld Systems Ltd ©