We have setup the ODK sync endpoint server and uploaded the forms to it, however we may regularly update forms and forms related files.
For instance, we have brought some updates in the handlebars file of a forms and now want to upload only the updated handlebars file to the server, how am I gonna do that?
I have tried uploading it through suitcase but to no avail.
I am not sure how/if you can update the handlebars files, but one option if you want to update forms mid-fielding you can download all your data, pre-load it into the revised forms, reset the app server, and push the revised version back up (new handlebars and all). This ensures that fields are compatible, etc., with already existing data. I would make very sure to back everything up and find a time when no one would be syncing before trying this! Another option is to simply create a new version of the app/forms, e.g. if you had βdefaultβ app you can create βv2β app that has the new version and have people switch to that β it depends a lot on your workflow and if you need to keep accessing data in v2.
You should be able to update your file using the upload tab in Suitcase. In that tab choose where you data is and then hit upload. The directory chosen must follow the ODK-X directory convention,
<NAME>
βββ assets
β βββ ...
βββ tables
βββ example
βββ forms
β βββ example
β βββ ...
βββ ...
You would point Suitcase to <name>.
Only the files you want to update need to be present but the directory structure needs to be complete.
It is also possible to use the CLI, check the CLI usage for more information.
Thank you, tested it and worked like a charm but worth to mention that along the directory structure I guess we must keep the definition.csv file as well.
I tried it with only my desired file and it was giving error but when I added that definition.csv file it got uploaded.
Is it also possible to update the formDef.json file using the same method, at least when there are no database schema changes? I actually tried doing this and I see an βuploadingβ message followed by an βError Occuredβ dialog box. Has anyone tried this?
I have tried that, but make sure you are a site_admin privilege level. Also you need to make the folder schema correctly match. Simply pointing out the formDef.json file wonβt work you need to put it in a folder <target folder>/config/tables/<table id>/forms/<survey id>/formDef.json
I havenβt tried it with the new UI however, but the underlying code is the same as it uses sync-client.
Thanks, I tried just that, but I am still unable to do this. I tried using CLI and this is the error I get -
Error: Unable to reach Cloud Endpoint server.
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The error refers to some SSL related issue but I am not sure what exactly. Can you help? Thanks.
BTW, I am able to use the GUI to sync the whole setup and also download data from the server. Only when I try to upload files, I get the error.