When I copy a filled form into the instance folder using adb, the copied form isn't visible

Hello

Since ODK Collect version v2022.2.0,
on my Android smartphone,
I can no longer add a manually saved form.

If I copy or rename a saved form (folder + xml form) in the "instance" folder, nothing happens!
Before this one was detected and loaded, and I could return the data during my development phases.

So I edit the file "instances.db" in the folder "metadata" with "DB Browser for SQLite" in order to change the value "submitted" to "complete" of the registered form. It is working. But it was easier just to rename the form by changing the time in its name for example. :wink:

Just in case this is an unintended behavior, because I checked in the administration pannel of odkcollect,"Import from form" is still mentioned.

I deleted the data and reinstalled the application, but it didn't change anything.

Thanks

I've confirmed that this is an unintended change in behavior. Thanks so much for reporting it. We are hoping to roll out a fix within the next day or so.

1 Like

Un instant! It does seem to be working as I expect.

There was a slight change in behavior about a year ago in that the sync with disk only happens when in the main menu. So if you are in e.g. Edit Saved Form and do what you've described, you should NOT see the new instance appear. However, you should see the count increase when you return to the main screen with all the action buttons and you should see the instance next time you enter Edit Saved Form. Can you please see if maybe you just didn't go back to the main screen?

As a side note, where did you learn to do this? Did you see a post on the forum? Find documentation? Look around the Collect source code and notice the feature? We expected it was not used much but have been surprised.

" It does seem to be working as I expect."
Sorry, i just find the problem, i'm writing directly my blank form in xml.
ODK collect was downloading my form correctly, everything was ok, input edit send.

But when i duplicate the form in the instances folder, the new one was not taken into account.
I just try this morning with another form and it worked.

It's because I used an accented character (é) in the tag of a field.

The problem :

I redeclared the <OQ_Flavescence_dorée/> field to <OQ_Flavescence_doree/> and the problem is solved.

Like i just update my ODK Collect application before working on this new form, and every think was working well, I thought it was the update.

"Can you please see if maybe you just didn't go back to the main screen?"
Indeed, I had already seen this behavior in previous versions, when exiting and entering ODK the new form appeared.

"As a side note, where did you learn to do this? "
I just try it by myself.
As I develop the reception and processing part of the form in php, I found this trick to send back the form quickly when I have a side server bug, during my dev process.
But it can be interesting to recover the forms from a broken phone, if the screen is broken, fews years ago instances can be save on a SDcard, now i think its not possible it is in internal storage...

I find the whole ODK suite great,
but i only use the smartphone ODKcollect with my own php code server side.
it allows me to do a job more suited to our needs, so I have a non-standard tool.
I self-host and i like my apache/php/mariadb server, it's easy for me to maintain.
I was not comfortable with tomcat with aggregate and now with docker, so I'm happy this way.

It's really great that the authentication protocol and the transmission protocol of xml files with the server is stable over time, thank you for this work.

2 Likes

Wonderful, I'm glad there's a simple explanation and that things are working now. I (Hélène) feel the pain of incomplete support for accented characters.

Thanks for describing your discovery process and how you use the functionality, that's very helpful!

:+1: Really appreciate all the feedback and information.

For anyone else reading this, please consider sharing your advanced workflows, especially using parts of the tools that we currently don't explicitly document. It helps us get a better sense of what's worth investing more in and adding documentation for.

1 Like