I have an XLS form that i created a while ago and i publish the form through onadata where it produces the XML. I have been using python2 all this time with pyxform 1.5.1
I have now migrated to python3 and pyxform 4.0.0. The XML produced is slightly different and i have no issues with the slight change in structure. My issue is that under relevant (on a group), the engine does not seem to process that logic, it just simply isn't there in the final XML. There is no binding on that node to anything at all.
**2. What steps can we take to reproduce this issue?
Create an XLS form with a group and add relevant logic to process a previous field.
I am doing** selected(${surf_type} , 'FLEX') or ${surf_type} = 'FLEX' After publising the form there is no node bound to these.
The form just runs through all the groups without checking what surf_type is
**3. What have you tried to fix the issue?
Tried changing the format of the relevant logic.
Tried using latest pyxform version (**4.4.1)
I tried the most minimal form given the information you provided: grp_relevant.xlsx (8.8 KB)
This converts as expected using https://getodk.org/xlsform/ which runs the latest code merged to https://github.com/xlsform/pyxform Can you reproduce the issue with your full form on that site? If you can, I agree that sending it as @yanokwa described would be a good next step.
As a side note, the ${surf_type} = 'FLEX' is not needed: the selected condition will always be true if the equality condition is!
I tested the form you sent me on getodk.org/xlsform, which is currently running pyxform v4.4.1, and it works as expected. The generated XForm correctly shows different sets of questions in Enketo based on the value of surf_type.
Based on that result, the issue appears to be somewhere in the pipeline you’re using to process the form.
Agreed, the problem should be in my code since https://getodk.org/xlsform/ produces the right xml.
I am using some code to fix the issue, which runs after the XML is produced.
This is just a work around until i have time to debug the pipeline.
I appreciate the time you have taken to look at the issue .