Thanks Yaw,
Gladly I'll do, so I'm attaching a simple smaple xml file with the current problem .
ODK Version 1.10.2
Workflow sample:
*All fields are required.
- As for the survey we ask your sex (M/F)
- then if you're the owner of the house (Y/N)
- if you are, we don't need to ask the sex again so we calcultae the value and copy from the first question (M/F)
CASE 1 in this stage all is ok
M, Y, M, Save
F, Y, F, Save
CASE 2 Here is the problem
M, N, M, Save,
M, N, F, Save,
F, N, F, Save,
F, N, M, Save,
On the third question you have to choose the sex of the owner, but when save/finalize the form it returns to the third question with a blank value and you enter in a loop.
calculate = if(/data/owner = 1, if(/data/sex = 1, '1', '2'), '')
the blank value comes from the first else (we don't want to assign a defalt value in order to avoid errors from the users), so the problem is tha when you finalize the form it do the calculate field again instead of saveing the current value selected.
TestSave.xml (2.8 KB)
Thanks for all your help