Monthly Archives: January 2015

Managing School Enrolments with Smap

Sometimes your forms need to change quickly.  One such case was suggested by World Vision staff who are working in Syrian refugee camps.  They wanted to record school attendance however new children are arriving daily and hence the attendance roll would be also changing daily.

Putting choices in a CSV file separate from the form can be the answer.   The file name is specified in the “appearance” column.  In the example below the choices will come from the “children.csv” file.  The other parameters to the “search” function are filters so that only children in “class1” are included.


Select Question Getting its Options from a CSV File

Choices in external CSV files have been available for a while, however the January 2014 release of Smap will have the following enhancements:

  • Support for select_multiple.  Previously only select_one worked,
  • You can now analyse select questions with external choices in graphs, tables and maps on the analysis dashboard,
  • and, CSV files can be attached to a single form or shared by all forms in the organisation.


This demonstration shows information on new school enrolments being collected using a form and then being added to a CSV file.  This file is then used to record attendance in school and is also used by a separate form to record vaccinations given to the children.

The data can be used in multiple forms because it is loaded to the “Organisation” tab in the media page rather than the “Form” tab. If you loaded different files with the same name to “Form” and “Organisation” then the file at the “Form” level will take precedence.

The files for this example can be found here.


  1. A school teacher uses fieldTask and a form called “enrolments” to record school attendance.  Any new children arriving that day are recorded in a sub form.  (using “begin repeat”)
  2. The back office team copy the details on the new children and put them into the “children.csv” file.  They upload this file to the Smap server where it replaces the existing file.
  3. The next day, before recording attendance, the Teacher presses “refresh” in fieldTask to get the latest form. They can then mark off the attendance of all the children including those that arrived the day before.
  4. A medical specialist using a form called “vaccinate”, presses refresh in fieldTask before checking the children in a class.  This will load the latest vaccination details into their phone.

CSV File


Children CSV file

This process is shown in the following video

Automation (Future)

The video showed a back office worker manually copying the daily enrolment data into the children CSV file.  This task could be automated by implementing a custom web page.  Apart from saving some effort for the back office administrators this would also apply updates faster resulting in more current data.

Other Applications of CSV files with Smap

CSV files storing data can be used in other applications, not just for school enrolments and vaccinations.  For example asset management, managing workforce etc.

version 14-12 Notifications

Here is, depending upon your location in the world, the last release of Smap for 2014 or the first release for 2015. The major change in this release is the addition of email notifications when a survey is submitted.  However the menus at the top of each page are also being progressively updated which will probably be the most visible change for most people.

Menu and Style Changes

The “bootstrap” javascript library is being implemented to replace “jquery-ui” and “foundation”.  In this release the following pages have been updated:

  • Form Management
  • Notifications
  • Locations (User Trail)

Pages will look a bit different, here is the form management page:


Smap has been divided into 4 sections:

  1. Home
  2. Admin
  3. Web Forms
  4. Analysis

These are accessible from a drop down menu labelled “View”.


Drop down “View” menu

In the image above the “Admin” option is greyed out as the view option was selected from “Form Management” which is part of administration.  In a future release another section called “Edit” will be added.

Within each section the menu options will appear to the right of the “view” menu.  For administration these options are:

  • Form Management
  • User Management
  • Notifications
  • Monitoring
  • Locations
  • Tasks

Each section will also have common menu options

  • help 
  • User Settings (an icon that looks like someone’s head and shoulders)

Unfortunately because this new menu layout is being implemented progressively you will find yourself jumping back and forth between the new and old menus as you navigate from page to page.  If you find this unbearable let me know and I will try and make all the pages consistent faster.


A notifications page has been added which allows you to request that an email be sent every time a new result is submitted to the server.

Notification Page

The notification page above shows a single notification that will send an email to two email addresses (separated by commas) when a result is submitted from the “modify stress test” survey. The email will contain a link to a web form view of the submission.

Web Form View of a Submission – Accessed by link in email

A log of all the notification events can be seen on the monitor page.

Application of email notifications

These could be used for quality assurance.  A supervisor can set up a notification for each submitted result which they can then review.  A future enhancement may allow filtering so that the emails are sent conditionally dependent on value of the data. Suggestions welcome.


Previously you could set up a survey to be forwarded onto another server on the form management page.  Now however, forwarding is considered a type of notification.  Hence you can set up forwarding on the notifications page.

Miscellaneous Changes

  • The email host can be set per organisation.  Previously an IT administrator had to set the address of your email server (smtp_host) in the tomcat web.xml file.  Now it can be set in the users page by editing the organisation details.  Note the value for smtp_host in web.xml is now ignored so you will need to update the organisation.  
  • A default value of smtp_host can be set for every organisation on the server.  This does have to be done by an it administrator in the survey_defintions database using a command like: insert into server (smtp_host) values (‘Your smtp host’);
  • When uploading a new form to the server from an XLS file,  the name of the form will default to the name of the file.  You can optionally change the form name.
  • Increased the width of the line showing the path taken by the user on the locations screen.
  • Previously you could not select a set of survey results for editing if that survey had been marked bad.  This restriction has been lifted. You are now only prevented from editing results if that record has been replaced by another one.
  • Performance improvement to “data cleaning”.  There were some issues in performance last month when multiple people were cleaning data in the same survey simultaneously. Database deadlocks were causing updates to hang which resulted in the server running out of database connections.  These deadlocks have been fixed.