Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 3

type name label repeat_count read_only

integer Q1 count of groups


begin_repeat G G ${Q1}
integer Q2 Age
select_one gender Q3 Gender
select_one yn Q4 Disability
calculate Q2_2
calculate Q3_2
end_repeat

begin_repeat get_index ${Q1}


calculate get_index_1

calculate get_index_2

end_repeat

text max_value max_value yes


text max_index max_index yes
text max_gender max_gender yes
calculation default

if(${Q2}<18,if(${Q4}='no',${Q2},0),0)
if(${Q2}<18,if(${Q4}='no',${Q3},0),0)

indexed-repeat(${Q2_2}, ${G}, position(..))


if(position(..)>1,if(indexed-repeat(${Q2_2}, ${G},
position(..))>indexed-repeat(${Q2_2}, ${G},
position(..)-1),position(..),0),position(..))

max(${get_index_1})
max(${get_index_2})
indexed-repeat(${Q3_2}, ${G}, ${max_index})
list_name name label
yn yes yes
yn no no

gender m Male
gender f Female

You might also like