The idea is to have a single form to collect files (from respondents) for whatever purposes my workmates have.
They are using email/google forms to accept files but that is unnecessarily cumbersome.
To make managing these forms easy, I want the people in my office to be able to categorize, add new requirements and set deadlines in the dropdown.
I will convert their inputs from a spreadsheet as choices in the xlsxform then redeploy to the published google sheet (the url that ends in .xlsx) to kobo.
I have the rest of the deployment part figured out except patching the forms in googlescript.
The curl example in the API doc and my google script
Hi @mkmortera, have you managed to run through the process correctly just using the shell? I’m not familiar with Google Script, so I’ll leave that to the community to assist. You could also use an external file to manage (with either pulldata() or select_one_from_file / select_multiple_from_file) which could be simpler to maintain (if I’m understanding your requirement correctly). You can then just replace that external file rather than the form itself.
I can, but I’d like to avoid that as much as possible. Theyd have to spend time to reach out to me every time and I have to reupload every time. That defeats the purpose. Will post here once I figure this out
I wasnt able to figure out how to convert a curl request but I was able to make a what I want using Google Forms/Google Scripts.
The downside is you cant use cascade select in Google Forms but it works, files and folders are automatically shared to the one who made the request to collect files.
Hi @mkmortera, I suggested that approach as it’s potentially easier to automate rather than adding more manual work, but perhaps I’m not fully understanding your use case.
But I wasn’t able to try since I was able to may it work using google form+sheet+script
Being able to update the form/replace the choices is nice.
I would be able to create a dropdown of prior incidents (submission id/text value entered in the form) so respondents can link prior incidents to a new incident with only google script, as requested by my boss.
I think I misunderstood you, possible to replace only the external file via api?
Then use the external file as choice?
Like this?
Hi @mkmortera, ok I understand what you’re trying to do. Unfortunately it’s a bit more involved than that — the xls_link is generated internally and is not the URL-linked xlsform. There are three steps you need to follow to replace and redeploy a form:
Replace the form, with a URL-linked form in your case:
If you are wanting to go the form media route rather than replacing the form itself, then that is the correct thread to follow. In essence: to update the media you need to delete the existing media file and then replace it with the updated one.