XLSForm conversion error at the final hurdle

I'm struggling to add a final image selection question to a 99% completed survey. .

I concluded this can't be done via Build - if it can assistance would be welcome - but regardless, thanks to @yanokwa concise response here - Image as a select option - I've added my question to the exported Excel file.

There's a whole tale of grief behind getting to the Excel file, as exporting from online Build is all but impossible (the dreaded "something went wrong" message) and seemingly and bizarrely works only when finding a PC not previously used for ODK purposes which will initially export before reverting to "something went wrong". Hence my preference to accomplish this task within Build and avoid needing to edit the Excel file.

Be that as it may I finally managed to export the survey as an Excel file, added the image selection question to the file and then attempted converting to XForm via ODK's XLSForm converter.

Again, as with exporting the XLSForm this is majorly hit and miss. The error message returned below on my recent attempt is notable for its reference to a pre-existing question "photo_queue_card" and not the single image selection question latterly added. This is in line with other testing carried out where I've managed to export a survey, make zero changes just to test the process but still receive an error message when attempting to convert to an XForm. Switching to Nafundi's XLSForm converter also yields error messages to a survey which works happily within Collect so something odd is happening for me within the export/convert process.

Error: ODK Validate Errors: XForm Parse Error: Encountered a problem with display condition for node [${photo_queue_card}] at line: (), Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@6d9c638 >> XForm is invalid. See above for the errors. org.javarosa.xform.parse.XFormParseException: Encountered a problem with display condition for node [${photo_queue_card}] at line: (), Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@6d9c638 Result: Invalid

As stated, if there's a way to add images to a choice question within Build that would obviate messing around with the Excel file all well and good but unless I've really missed the obvious any pointers to what might be going wrong here gratefully received.

P.S. tried the latest 0.3.4 Build and running in administrator mode all to no avail.

Hi @panthonyl

Could you attach your form, it might be a smaller version showing the same issue you don't need to attach an original one if it's huge.


A good night's sleep and the completely obvious strikes me on waking. What the hell was the goobledygook string, listed in many relevant cells, doing there when quite clearly the correctly formatted statement was showing in other cells. Talk about missing the wood for the trees.

A quick check against the current ODK Build clearly shows the corruption on exported file.

See attached copy and paste from source file.

Relevance Transposition.xlsx (70.8 KB)

Suspect sorting this issue will go a long way to resolving both my exporting to XLSForm and XForm conversion tribulations.

And while in a more observant frame of mind.

A relevant string which at first glance seemed OK has in fact been truncated, leaving syntax which will no doubt cause a validation problem.

The truncation appears only when viewing the sheet, the full data is however contained within the cell itself. Have I bumped up against a missed limit for character input?

See here;
Relevance Transposition - Limitation of Excel.xlsx (47.5 KB)

With the benefit of hindsight no wonder I was having problems.

Hi @Grzesiek2010

I've hopefully more precisely identified the issue now.

Hi @Grzesiek2010,

Just a thought as to what might be causing the corruption within the exported XLSForm to occur.

I have a long ist of countries, arranged alphabetically, set as a Choose One question. Subsequent questions reference this list so as to allow translated questions by language group, using the countries' 3 digit underlying value as part of the relevant cell statement.

For ease of my own quick visual reference I have not neccesarily ordered the relevant statement in the same alpha-order as the original country listing. As an example;

/data/home = "DEU" or /data/home = "AUT" or /data/home = "CHE"

rather than AUT, CHE, DEU

Is it possible this "mis-ordering" is causing an issue?

I don't know, you didn't attach an xls form we can try to convert and look at it.

The issue can be viewed by reference to cell A2 in the included XLSForm (Relevance Transposition) posted earlier in the thread.

Since opening the thread I've realised the issues are related to relevant statements being incorrectly exported out fromBuild to XLSForm. I'm going to create a small example covering the specifics and submit it as a bug in the next day or two,.