Dynamic repeat count

typenamelabelrepeat_count
begin_repeathousehold_membersHousehold member${num_members}
textmember_nameMember name
integermember_ageAge
end_repeat

Indexed access: indexed-repeat()

typenamelabelcalculation
calculatefirst_nameindexed-repeat(${member_name}, ${household_members}, 1)

Current instance position: index()

typenamelabel
begin_repeatplotsPlot
noteplot_labelPlot number ${index()}
end_repeat

Summarising repeat data

FunctionExampleការពិពណ៌នា
count(group)count(${household_members})ចំ នួ ន instances
sum(field)sum(${loan_amount})Sum
min(field)min(${member_age})Minimum
max(field)max(${member_age})Maximum
join(sep, field)join(', ', ${member_name})Comma-separated list
count-if(group, expr)count-if(${members}, ${member_age} < 18)Conditional count

Nested repeats

typenamelabel
begin_repeathouseholdsHousehold
texthh_idHousehold ID
begin_repeathh_membersMember
textmember_nameMember name
end_repeat
end_repeat

Best Practices

  1. ប ្ រ ើ repeat_count ពេ ល ចំ នួ ន repetitions ត ្ រ ូ វ ប ា ន ដ ឹ ង ।
  2. ដ ា ក ់ ឈ ្ ម ោ ះ repeat groups ដ ោ យ ច ា ស ់ ។
  3. Test ជ ា ម ួ យ ចំ នួ ន instances ច ្ រ ើ ន ។

Limitations

  • indexed-repeat() ត ្ រ ូ វ ក ា រ index valid ។
  • Nested repeats ច ្ រ ើ ន ជ ា ង 2 levels ម ិ ន ណ ែ ន ា ំ ។
តើទំព័រនេះមានប្រយោជន៍ទេ?