Problem Resolution

Submitted Data does not appear in the console or analysis module

The first place to look is Monitoring, Select the "submitted" tab and see if your survey has anything in the "Errors" column.

The monitoring page showing an error in a submission

Monitoring Page Showing an Error

To view the reason for the error; change "Show" to "Last 200". This will show details on each submission. You can filter to only show Errors if you want to zero on the errors.

Showing the error details

Error Details

In the above image, the error is caused by an answer of type "text" (character varying) being written to a column of type integer in the database. The column name is "id". When you are editing a survey you cannot change a question of type integer to text. If you come across this follow the instruction in Question type has changed to an incompatible value to resolve it.

Question type has changed to an incompatible value

The easiest way to fix this is to Deleting and Restoring Data the survey in the analysis module.

Warning

Restore first deletes the old data including its table then recreates it with the latest survey definition, so the latest question types, it then reapplies all of the submissions. However this won't always work. Firstly if you have changed the data since it was submitted then you will lose all of those changes. Secondly if you changed the data type from say "text" to "integer" and if some of the early submitted data was values like "Only One" then that will now fail when the submissions are reapplied. However changing integer to text should always work. In both of these cases you will need to use one of the other methods described below..

Fixing incompatible types with backup restore

  1. First backup the existing data
  2. Then delete the data using the analysis module (Deleting and Restoring Data)
  3. Then restore the backed up data
  4. Finally using the monitoring page re-apply the failed submissions (Re-apply failed uploads)

Fixing incompatible types using SQL statements

  1. Get the table name using the online editor and selecting the menu "File" and then "Info"
  2. Open the "results" database
  3. Get the column name, this will be similar to the question name but all lower case. in psql use:: \d {table name}
  4. Alter the column type in PSQL: alter table {table name} alter column {column name} type {new type}. For example: alter column id type text;
  5. Types could be text, integer, timestamp with timezone or double precision
  6. If there is incompatible data already in the table you will have to do some conversions to new valid data
  7. Then go to the monitoring page, select the survey and click on "Re-apply Failed Uploads"