-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
Description
Software and hardware versions
pyxform v1.3.3
Problem description
When trying to use a select one from repeat inside the current repeat, the wrong reference is produced. It should be ../../repeat but instead is ../.
Steps to reproduce the problem
| type | name | label | choice_filter | appearance | relevance | calculation |
|---|---|---|---|---|---|---|
| begin_repeat | pet | Pet | field-list | |||
| calculate | pos | position(..) | ||||
| select_one ${animal_type} | animal_select | Select the animal type. If not in the list, type below. | position() != current()/../pos and animal_type != '' | |||
| text | animal_type | Animal type | ${animal_select} = '' | |||
| end_repeat | pet |
def test_choice_from_previous_repeat_in_current_repeat__parents_out_to_repeat(self):
xlsform_md = """
| survey | | | |
| | type | name | label |
| | begin repeat | pet | Pet |
| | select_one ${animal_type} | animal_select | Select the animal type |
| | text | animal_type | Specify the animal type |
| | end repeat | pet | |
"""
self.assertPyxformXform(
name="data",
debug=True,
md=xlsform_md,
xml__contains=[
'<itemset nodeset="../../pet">',
],
)
Reactions are currently unavailable