Introduction
In this tutorial we will build a survey for the registration of farmers with farmer detail data and a survey of the crop grown and field size. An additonal requirement is that the mobile users only access the data of the farmers registered in their province. Before you can create a survey in DENKAMI you need to register and create an account and activate the Free Trial subscript, then you are ready to go!
You can access the Survey Design plaform on URL: your_account_name.denkami.com/survey
When logged into the Survey Designer platform you will see the the screen below and you can get started with designing your surveys.
1. Survey structure
When designing a survey it is important to understand the structure of the surveys, the structure is shown in the graph below. In the graph you see the Registration survey which is used for the registration of the data elements, in this example the farmer. Linked to the Registration survey on the right are Survey questionnaires, this is data you want to collect over time for the data elements of the Registration survey, you can add as many survey questionnaires as you want.
On the left of the Registration survey you see the mobile user group(s). A mobile user group, groups the mobile users and controls the data the mobile users can access, which is done through the registration tables. This will become more clear when you design your survey.
For the design of our survey we will:
- Define a new survey
- Create the Registration tables
- Create the Registration survey
- Create the Survey questionnaires if required
- Create the mobile user accounts
- Create the mobile user groups
- Create the reports and graphs
2. Define a new survey
To create a new survey click on + Add survey and fill in form; give the name and description of the new survey and click the update button. Access the new survey from the SURVEYS dropdown.
3. Create the Registration tables
After defining the new survey click on the menu Registration tables to create the registration tables, each survey needs at least one registration table.
For our survey we have mobile users based in one of three provinces and a mobile user who is the supervisor and can see all farmer data in all provinces. To implement this we need four mobile user groups, one for each province and one for the supervisor. This can be achieved by using the data structure for the registration tables as shown in the graph below. There are two registration tables, Company and Province, each province belongs to the company Denkamy. When you register a farmer, the farmer will always belong to the company Denkami and can belong to any of the three provinces.
To create the registration tables:
- Add two registration tables, click the + button in the left table to create a new Registration table, name the first table Company and the second Province.
- Enter the values for the two tables, select in the left table "Company" and click the + button in the right table to add the value for the company. Select then in the left table "Province" and click the + button in the right table to add the values for the three provinces, for the parent value of the provinces select the name of the company.
The registration tables should look like this:
4. Create the Registration survey
After creating the registration tables we can now start with the design of the registration survey, to access the registration survey select Registration under the CREATE QUESTIONNAIRES menu, see graph below. As you can see in the graph, the registration survey has already two questions for the two registration tables you created.
Lets create a simple registration survey for the registration of farmers and collect the following data: full name, ID number, gender, mobile tel number, GPS coordinates of the farm and the registration date:
PROPERTY | VALUE | COMMENT |
Name | name | Name of the data field |
Title | Give the full name | The title of the question as seen by the user |
Is required? | Yes | This is a required data field, the user must fill in this question before the survey can be submitted |
Input type | Text | The data is a text field |
Mobile->Header | 1 | If this value is larger than 0, this data field will be shown in the header on the phone. |
Validation->Validators |
- Select text validator
- Text-> Name must be at least 3 charcaters
- Minimum length->3
|
To ensure the name is at least 3 characters add a validator. The text field is the alert message when the name is less than 3 characters |
PROPERTY | VALUE | COMMENT |
Name | ID | Name of the data field |
Title | Give the ID number | The title of the question as seen by the user |
Is required? | No | This is not a required data field in case the user does not have an ID number |
Input type | Text | The data is a text field |
Input format | 999/999999 | The ID provided must be in the format 3 numbers forward slash 6 numbers |
Mobile->Header | 0 | Do not show this data field on the mobile app when listing all registered farmers. |
PROPERTY | VALUE | COMMENT |
Name | gender | Name of the data field |
Title | Give the gender | The title of the question as seen by the user |
Is required? | Yes | This is a required data field |
Choices |
Row 1 -> Value: M, Text: Male
Row 2 -> Value: F, Text: Female
Row 3 -> Value N/A, Text: N/A
|
With the radiogroup question you can set the choices presented to the user to select. |
Mobile->Header | 0 | Do not show this data field on the mobile app when listing all registered farmers. |
PROPERTY | VALUE | COMMENT |
Name | mobile | Name of the data field |
Title | Give the mobile number | The title of the question as seen by the user |
Is required? | No | This is not a required data field, this data field can be skipped if there is no mobile number |
Input type | Text | The data is a text field |
Mobile->Header | 2 | Set the value for the Mobile->header to 2, the mobile tel number will be added to the header when listing the farmers, this will also enable you to search the farmer by mobile number on the mobile app. |
PROPERTY | VALUE | COMMENT |
Name | GPS position | Name of the data field |
Title | Get the GPS postion of the farm | The title of the question as seen by the user |
Is required? | No | Not required in case the mobile phone does not read the GPS postion the survey cannot be finalised |
Input type | Text | The data is a text field |
Mobile->Header | 0 | Do not show in the header on the mobile app. |
PROPERTY | VALUE | COMMENT |
Name | reg date | Name of the data field |
Title | registration date | The title of the question as seen by the user |
Expression | today() | It will fill in todays date, the user cannot change this |
Mobile->Header | 0 | Do not show in the header on the mobile app. |
5. Create the survey questionnaire
After creating the registration survey we can now add a survey questionnaire, to get started click on + Add questionnaire under the CREATE QUESTIONNAIRES menu. Provide a name and description, let's call it farm survey and click save; you will see the new survey listed under the CREATE QUESTIONNAIRES menu.
We want to survey if the farmer planted one of the three crops Maize, Sunflower and Soybeans and the field size for each of the crops:
PROPERTY | VALUE | COMMENT |
Name | planted | Name of the data field |
Title | Did you plant Maize, Sunflower or Soybeans | The title of the question as seen by the user |
Is required? | Yes | This is a required data field |
Data |
Value true -> 1
Value false -> 0
|
When selecting True the system will record the value 1 and for False the value 0 |
Mobile->Header | 0 | Do not show this data field on the mobile app when listing all registered farmers. |
PROPERTY | VALUE | COMMENT |
Name | crops | Name of the data field |
Title | Select the crops the farmer grows | The title of the question as seen by the user |
Is required? | Yes | This is a required data field |
Choices |
Row 1 -> Value: Maize
Row 2 -> Value: Sunflower
Row 3 -> Value: Soybeans
|
With the checkbox question you can set the choices presented to the user to select. The user can select multiple options. |
Mobile->Header | 1 | Do show this data field on the mobile app when listing all registered farmers for whom this questionnaire was done. |
Logic | Visible if -> Select question -> planted equals Yes | Only ask this question when the answer to the planted question was Yes. |
PROPERTY | VALUE | COMMENT |
Name | maize field size | Name of the data field |
Title | What is the size of the Maize field in hectares. | The title of the question as seen by the user |
Is required? | Yes | This is a required data field |
Input Type |
Number
|
Field size is a number |
Mobile->Header | 0 | Do not show this data field on the mobile app when listing all registered farmers |
Logic | Visible if -> Select question -> crops contains Maize | Only ask this question when Maize is selected in the crops question. |
6. Create mobile user accounts
Each mobile user using the mobile application needs a user account, to add a new mobile user click on Mobile users in the menu on the left. Click the + button to add a new mobile user.
7. Create mobile user groups
For mobile users to access the registration survey and farm survey we need to create a mobile user group that links the mobile user to the surveys. Lets create a mobile user group for the users in the Northern province and call it Nortern province. Click on the + button and fill in the form with the values:
- name: Northern province
- description: Mobile users in Northern province
- Registration table: Province
- Registration table values: North
- Select mobile user: .....select here the mobile user(s) who will be a member of this mobile user group
- Registration can register: When ticked the users in this group can register new farmers on the mobile app
- Registration can edit (own): When ticked the users in this group can edit registration data of the farmers they registered
- registration can edit (all): When ticked the users in this group can edit registration data of all farmers
- Select surveys for this mobile user group: Farm survey
- Farm surveys can survey: When ticked the users in this group can do the farm survey for registered farmers on the mobile app
- Farm surveys can edit (own): When ticked the users in this group can edit the farm survey they did on the mobile app
- Farm surveys can edit (all): When ticked the users in this group can edit the all farm survey