I am using Excel to build my forms and have a Parameters column. I limit the size of images using the parameter max-pixels, which works fine…
However, ODK has just released 1.2021.3 which allows the parameter allow-mock-locations=true and this doesn’t work. I have imported the XLSX file to Kobotoolbox and downloaded the xml - it does not have the necessary ‘bind’ instruction:
ODK (online) produces this output: <bind nodeset="/data/Location" odk:allow-mock-accuracy="true" required="true()" type="geopoint"/>
Kobotoolbox produces this output: <bind nodeset="/data/Location" required="true()" type="geopoint"/>
I know this is a new feature, but I am surprised that Kobotoolbox strips out parameters that are ODK-Collect specific - and I can’t find a way of adding parameters to the form using the formbuilder…
I have manually edited the xml on my device to add the relevant parameter and find that this works, and the completed form uploads. However, this is not viable as I do not have access to all the devices that will use this form…
Is there a solution or work-around that would allow me to use this function? Or a timescale where support for this will be added.
Hi @Kal_Lam
Here is a sample with just the relevant questions and columns. And the xml that was run through ODK XLSForm Online (so this works as expected).
Many thanks for your help. Sample-mock.xlsx (9.7 KB) Sample-mock.xml (1.1 KB)
Thanks for your suggestion - I am using ODK Collect (and have done prior to discovering Kobo’s excellent online tools). My apologies for not clarifying that.
The problem is with Kobotoolbox conversion of an XLSX that removes the parameter value, so it doesn’t work as expected on ODK Collect. I don’t have a way of editing the XML remotely as far as I know.
Hi @seewhy, thank you for pointing this out. The feature you are referring to has only just been included into the latest version of pyxformv1.7.0 (seen here in the change log) and KoBo is currently on v1.5.1. You can see the difference in output from the two versions here on your sample form:
A lot of users are using ODK Collect together with KoBoToolbox (incl. Enketo preview). So, I think, it would be great if (new) features of ODK would not cause upload or deployment or preview errors in KoBo. (Just a warning might be given instead?)
Hi @wroos, this is a separate issue to the original post since one can import, preview, deploy, etc. the Sample-mock.xlsx form without error. Having said that, when ODK releases new features in pyxform we should prioritize upgrading as soon as practical so they are available on our platform. This does not guarantee that Enketo or the KoBo form-builder will support these new features but they will at least be available when one imports an XLSForm containing them to use with Collect.