Previous Next

As discussed in the previous help topic, you can manually create and manage server datasets from the Your forms and datasets section of your server console's Design tab. And if you attach a server dataset to a form, that dataset's data will be available as pre-loaded data that can be pulled into calculated form fields, used to dynamically populate multiple-choice option lists, or even pre-loaded as default values for user-editable survey fields. But you might also want to go in the other direction: publish data from a form's submissions into a dataset (which could then, in turn, be attached to one or more forms).

If you publish a form's submissions to a server dataset, then any submissions received for that form will automatically add to or update the existing dataset. If you want, you can configure multiple forms to publish to a single dataset, which can then serve as an attachment to one or more other forms. This allows for extremely powerful workflows, depending on your needs.

To publish form data to a server dataset, first find the dataset in the Your forms and datasets section of the Design tab (or add it there, giving it a title and unique ID). Then click Publish into and select the form from which you would like to publish data.

After that, you will need to decide exactly which form fields to publish, to exactly which fields in the dataset (we call this process "mapping"). There is an Add all button to simply add all form fields at once (or, in the case of encrypted forms, all form fields that have been marked as publishable), plus an Add button to add fields one-by-one. For each added field, SurveyCTO will default to publishing to a field name in the dataset that matches the field name in the form – but you can override this default in cases where you want the column name in the dataset to be different.

Note that fields that are inside repeat groups will be published in "wide" format. They will be listed with an * at the end of their names, and they must be mapped to destination fields that also end in *. When repeated data is published, the * will be automatically replaced by _1 for the first instance, _2 for the second, and so on.

Other options

Finally, you have a few other options available:

  1. You can indicate one of your form fields to use in uniquely identifying records in the dataset. If you do, then new form submissions will either update an existing row in the dataset – if a row with a matching value in the corresponding field already exists – or insert a new row. If you don't specify a unique identifier, then new submissions will simply publish as new rows. You would likely want to use a unique identifier if you were using a single dataset to merge data from multiple forms. (This unique identifier has to be one of the form fields that you listed in the field mapping. I.e., you also have to publish whatever field is being used to uniquely identify rows.)
  2. You can indicate one of your form fields to use as a kind of filter. If you do, only submissions for which the specified field contains the value 1 will be published. For example, if you wanted to only publish data for children, you might select an "ischild" field as the filter; in your form, that could be a calculate field with a calculation expression like "if(${age} < 18, 1, 0)".
  3. You can check Publish existing data if you want to publish existing form submissions. If you don't check this option, then only new submissions that come in (after you configure publishing) will publish to the dataset.

Publishing

As form submissions come in to the server, they will be published to your datasets according to the mappings that you have configured – but there will be a brief delay. The datasets, the forms to which they are attached, and the record counts on the Export tab will only update 5-10 minutes after the most recent submission has been received. This means that, as data-collectors are actively uploading their submissions, the datasets will not update again and again and again, but will instead update only after 5-10 quiet minutes have passed. So, if you download a form or a dataset and find that it doesn't have up-to-the-minute data, please wait a few minutes for the dataset to update.

If you would like to further publish your datasets on to Google Sheets or another outside system for real-time monitoring or visualization, see Publishing server datasets to the cloud.

Previous Next