YamboInstrumentry

Instrumentry

Example conversion

A household survey, from questionnaire to XLSForm.

One real conversion, shown in full: the questionnaire that went in, the XLSForm that came out, and the item flagged for review.

Sample data. The questionnaire is synthetic, written for testing; there is no real survey or respondent behind it.

Download this XLSForm (.xlsx)The questionnaire (.txt)

What went in

Rural Household Livelihood Survey 2026 - Short Questionnaire

SECTION A: IDENTIFICATION
A1. Date of interview (dd/mm/yyyy)
A2. Name of interviewer
A3. Province: 1 = Northern  2 = Central  3 = Southern
A4. GPS location of the dwelling (record coordinates)

CONSENT
Read aloud: "Hello, my name is ____. We are conducting a survey about household livelihoods. Participation is voluntary and your answers are confidential."
A5. Does the respondent agree to be interviewed? 1 = Yes  2 = No  (If No, end the interview)

SECTION B: HOUSEHOLD ROSTER
(Complete one line for each person who usually lives in the household)
B1. Name of household member
B2. Sex: 1 = Male  2 = Female
B3. Age in completed years (0-98)
B4. Is [NAME] currently married? 1 = Yes  2 = No   (Ask only if age is 15 or older)
B5. What is [NAME]'s main occupation? 1 = Farming  2 = Trade  3 = Salaried work  4 = Student  5 = Other (specify)

SECTION C: HOUSING AND ASSETS
C1. What is the main source of drinking water? 1 = Piped water  2 = Borehole  3 = Surface water  4 = Other (specify)
C2. Does the household own any livestock? 1 = Yes  2 = No  -> If No, go to C4
C3. How many cattle does the household own? (number, 0-500)
C4. Which of the following does your household own? (Select all that apply)
    a. Radio  b. Television  c. Bicycle  d. Motorcycle  e. Mobile phone
C5. How many rooms does the household use for sleeping? (number, 1 to 20)

SECTION D: FOOD SECURITY
D1. In the last 30 days, did you worry that food would run out? 1 = Yes  2 = No
D2. If yes, how often? 1 = Rarely  2 = Sometimes  3 = Often
D3. Any comments from the respondent about food availability?

What came out

The survey sheet, row by row, in XLSForm’s own terms: relevant (skip logic), constraint (allowed answers), repeat (the household roster) and choice lists.

typenamelabelhintrequiredrelevantconstraintconstraint_message
begin_groupsection_aSECTION A: IDENTIFICATION
datea1_interview_dateDate of interview (dd/mm/yyyy)
texta2_interviewerName of interviewer
select_one provincea3_provinceProvinceyes
geopointa4_gpsGPS location of the dwelling (record coordinates)yes
end_group
begin_groupconsentCONSENT
noteconsent_statementHello, my name is ____. We are conducting a survey about household livelihoods. Participation is voluntary and your answers are confidential.
select_one yes_noa5_consentDoes the respondent agree to be interviewed?If No, end the interviewyes
end_group
begin_groupsection_bSECTION B: HOUSEHOLD ROSTER${a5_consent}='1'
begin_repeathh_rosterHousehold members
noteb_instrComplete one line for each person who usually lives in the household
textb1_nameName of household memberyes
select_one sexb2_sexSexyes
integerb3_ageAge in completed yearsyes. >= 0 and . <= 98Age must be between 0 and 98
select_one yes_nob4_marriedIs [NAME] currently married?Ask only if age is 15 or olderyes${b3_age} >= 15
select_one occupationb5_occupationWhat is [NAME]'s main occupation?yes
textb5_occupation_otherOther (specify)${b5_occupation}='5'
end_repeat
end_group
begin_groupsection_cSECTION C: HOUSING AND ASSETS${a5_consent}='1'
select_one water_sourcec1_waterWhat is the main source of drinking water?yes
textc1_water_otherOther (specify)${c1_water}='4'
select_one yes_noc2_livestockDoes the household own any livestock?yes
integerc3_cattleHow many cattle does the household own?yes${c2_livestock}='1'. >= 0 and . <= 500Must be between 0 and 500
select_multiple assetsc4_assetsWhich of the following does your household own?Select all that applyyes
integerc5_roomsHow many rooms does the household use for sleeping?yes. >= 1 and . <= 20Must be between 1 and 20
end_group
begin_groupsection_dSECTION D: FOOD SECURITY${a5_consent}='1'
select_one yes_nod1_worryIn the last 30 days, did you worry that food would run out?yes
select_one frequencyd2_frequencyIf yes, how often?yes${d1_worry}='1'
textd3_commentsAny comments from the respondent about food availability?
end_group

The choices sheet

list_namenamelabel
province1Northern
province2Central
province3Southern
yes_no1Yes
yes_no2No
sex1Male
sex2Female
occupation1Farming
occupation2Trade
occupation3Salaried work
occupation4Student
occupation5Other (specify)
water_source1Piped water
water_source2Borehole
water_source3Surface water
water_source4Other (specify)
assetsradioRadio
assetstelevisionTelevision
assetsbicycleBicycle
assetsmotorcycleMotorcycle
assetsmobile_phoneMobile phone
frequency1Rarely
frequency2Sometimes
frequency3Often

Flagged for review

Every form is converted with pyxform before you see it, and anything doubtful is listed like this. Review each form before you field it.

Convert your own

Free during the pilot, with an access code. Pilot limits and access

Convert a questionnaire