How to create a survey?

(1)  Enable the "Survey" module in the folder where the survey is to be created

  • Select the menu " --> Folder --> Management" on the top right-hand side of the page.
  • Select the tab "Folder Type".
  • Select the "Survey" module.
  • Confirm by clicking at the "Update Folder" button.

(2)  Ensure that you have a table where to store the survey data

  • A table can be created in the menu " --> Manage Lists" on the top right-hand side of the page.
  • Click at the "Create New List" button.
  • If needed, check the LabKey documentation on how to create a simple list manually: Manually Define Fields.
    Or check the FAQs on how to create a list from an existing data file: How to create a table importing from a file?

(3)  Create a "Survey Design"

  • In the "Survey Designs" Web Part, click at "Create Survey Design".
    To select a Web Part, enter into "Admin Mode" by selecting " --> Page Admin Mode". More details in the FAQ How to change the contents of a page?

  • In the "Schema" dropdown box, choose "lists".
  • In the "Query" dropdown box, choose the table where to store the survey data.
  • Give a name and a description.
  • Click the "Generate Survey Questions" button. That will generate a survey based on the field names of the chosen survey table.

  • Adapt the proposed survey design as required. Some JSON code snippets can be extracted from the "Question Metadata Examples".
  • Click the "Save Survey" button.

For further information, see Survey Designer: Customisation from the LabKey documentation.

(4)  Fill out the survey

  • Add a "Surveys" web part with the previously created survey design "Test design".
    If necessary, check the FAQ How to change the contents of a page? to see how to add a web part.
  • Click on the button "Create Survey" of the "Surveys" web part to start to populate a new survey instance.

Discussion