10 Essential XLSForm Templates to Speed Up Your Data Collection

Written by

in

How to Fix Common XLSForm Errors and Validation Issues Building forms with XLSForm for tools like ODK, KoboToolbox, or Survey123 is highly efficient until a validation error halts your deployment. XLSForm syntax is strict, and a single typo can break an entire form.

This guide breaks down the most common XLSForm errors and provides immediate steps to fix them. 1. Mismatched or Missing Choice Lists

This issue happens when the list_name in your survey sheet does not match the list_name in your choices sheet. The Symptoms

Error: ODK Validate Errors: Group Vices: Survey element […] specifies choice list […] that does not exist.

Dropdown or multiple-choice questions appear completely blank in your web or mobile app.

Check Spelling: Ensure the name in the select_one [list_name] or select_multiple [list_name] column in your survey sheet perfectly matches the list_name column in your choices sheet.

Remove Spaces: Choice list names must not contain spaces. Use underscores (e.g., car_brands, not car brands).

Verify Case Sensitivity: XLSForm is case-sensitive. Regions and regions are treated as completely different lists. 2. Duplicate Names in the Survey Sheet

Every question in your XLSForm must have a unique identifier in the name column. The Symptoms Error: There are more than one survey elements named […] Data columns overwrite each other during export.

Audit the Name Column: Scan your name column in the survey sheet for duplicate entries.

Add Contextual Prefixes: If you ask for a phone number twice (e.g., for a supervisor and a respondent), differentiate them by using names like sv_phone and resp_phone.

Check for Reused Names in Groups: Even if questions are inside different groups or repeat blocks, they still require completely unique names. 3. Invalid Characters in Names and Values

XLSForm restricts the types of characters you can use in backend identifiers. The Symptoms Error: The name […] contains invalid characters. Form fails to convert or crashes during data collection.

Clean the Name Column: The name column in the survey sheet and the name column in the choices sheet can only contain letters, numbers, and underscores. They must never start with a number.

Keep Labels Separate: Do not confuse name with label. The label column is what the user sees and can contain spaces, accents, symbols, and punctuation. The name column is for the database and must stay clean. 4. Syntax Errors in Calculations and Logic

Using relevant logic (skip logic), constraints, or calculations requires precise XPath syntax. The Symptoms

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *