Documentation

Working with survey materials

Open Materials in your survey to add media, data tables, and experimental designs. Use them in Survey → Code to look up values, select media, or run a saved design. In Survey → Builder, choose an attachment, source answer options from a table, or add a saved conjoint design.

  • Media. Upload images or videos for respondents to see. Use metadata to select files by brand, campaign, or another field in your study.
  • Data files. Store custom postcode groupings, product codes, reusable answer lists, or the weights your survey code applies when calculating segment scores.
  • Experimental design. Create or import a choice-based conjoint design, then use its saved concepts, tasks, and task sets in the survey.

When to specify a material

Select a material when the survey needs to read rows or run a media query. When you pick a single attachment in Builder, you can browse eligible files across the current survey. Builder records which material owns the file when you select it.

Where you lookWhat you can search or select
Builder image or video pickerBrowse files of the relevant type across the current survey's materials. Select the file directly.
Builder → From materialsChoose one material and a column. For answer options, choose a text column.
Builder → Media queryChoose a media type and one material, then add metadata filters if needed. Original Media targets the survey's original media table.
Code with s.get_material() or s.get_materials()Both require a material name or ID. The filters apply to rows in that table.
Code with the image or video helpersPass a material name or ID to query that table. A call with no material selector uses only the original Media table, even if you have renamed it.
Builder or Code with a saved conjoint designSpecify the three tables for concepts, tasks, and task sets.
Materials → SearchSearch row values in the currently selected table. Use the Material menu to switch tables.

Filename and metadata filters apply within the selected material. To combine rows from several tables, read each table by name or ID. If some tables may contain no matches, read the rows without filters and apply the conditions in Python.

Add and use media

Open Materials in an existing survey or at the Materials step in New Survey. Select Create → Upload files, name the material, then choose Secure or Non-secure before selecting your files. To upload more files to a media material, select it and choose Add row. Each file has its own row. Use Add column to add metadata, then edit the values in the grid.

Flavour pack shots in the Materials tab, with a thumbnail, concept code, flavour, and pack format on each row

  • In Builder, use the image or video picker when the question should show a specific file. Use Media query when a supported field should use files that match the selected metadata, with the results determined when the respondent reaches the question.
  • In Code, use s.get_image() or s.get_video() for one file. Use s.get_images() or s.get_videos() for a list. Pass the material as the first argument and use file_name or other metadata columns as keyword filters. A lookup for one file must match exactly one attachment. A lookup for a list raises an error when no files match.

Wait for uploads and video processing to finish before testing. Use Replace media to update an attachment while keeping its filename and security mode. Including media in your survey · Media functions

Create or import a data table

Choose Create → Blank table to enter data in the workspace. A blank table starts with a code column as its Unique ID. Use Add column to define the fields and their types, then Add row to enter each ID. Edit the remaining values in the grid. To make another eligible column the key, open its column menu and choose Use as unique ID. Every ID must be unique and non-empty.

Pack claims data table with a unique code, claim text, and claim territory on each row

Choose Create → Import spreadsheet to create a table from an .xlsx workbook. Name the worksheet Material. Put column names in row 1 and text, number, or boolean types in row 2. Use lowercase letters, digits, and underscores in names, starting with a letter or underscore. Start the data in row 3. The first column becomes the Unique ID and must be text or number. Store postcodes and identifiers with leading zeros as text. Check the imported rows and save the survey.

  • In Builder, choose From materials in a supported field, then select a material and column. Use this for lists such as text answer options. Save the question and the survey.
  • In Code, pass the material name or ID as the first argument to s.get_material() for exactly one row or s.get_materials() for all matching rows in their stored order. Set column to read values from one column. Names are case-insensitive. Keyword filters match exact values. A filtered lookup with no matches raises a validation error. If a respondent's input may be missing from a lookup table, read the table into a dictionary and handle missing keys in your code. Reading rows and column values

Builder question with a selected pack image and answer options sourced from the Claim column in Pack claims

Use a postcode table when you need study-specific groupings, such as store catchments that cross standard geographic boundaries. Use the built-in Location Question for standard fields such as city or region. Location Question

Use a saved experimental design

Choose Create → Conjoint design to define attributes and levels, generate tasks, and review the design before saving. Use Import conjoint design to start from a planner setup. Open Concepts, Tasks, and Task sets to review the alternatives, how they are grouped into tasks, and their order within each set.

Saved conjoint design showing the Concepts tab with flavour, pack size, and price columns

  • In Builder, add or edit a Conjoint question. Select Named material collections, then choose the matching Concepts collection, Tasks collection, and Task sets collection from the same design.
  • In Code, select Copy survey code in the saved design and add the s.conjoint_question() call where respondents should see the exercise. The call names all three materials.

Test the survey and check the task sequence before fielding. Setting up a conjoint study · Use a saved design from Materials

Update an existing material

Edit cells directly in the grid or select Excel to download the selected table. To apply workbook changes, use Import above that same grid. Keep the Material sheet and the existing column names and types. Check the result and save the survey.

  • Existing IDs match existing rows. Rows omitted from the workbook stay in the table.
  • An unused ID adds a row to a data table. Changing an ID to an unused value therefore leaves the original row in place. For a media table keyed by filename, upload new files in Materials before importing their metadata.
  • To delete rows or rename or remove a column, use the grid. Review any questions or code that refer to the affected values or column, then test the updated survey. Editing media metadata in Excel

Copy a material from another survey

In the destination survey, choose Materials → Create → Copy from survey. Select a source survey you can access and the data or media material you want to copy. Give it a unique name in the destination survey. If an attachment filename already exists there, enter a new filename including its extension. After copying, you can edit the new material independently. To reuse an entire conjoint design, copy the survey or use the planner setup import.