I am currently gathering information for a service mapping. Usually these tools are so extensive and recurrent, there is a lot of resistance to answer them in Venezuela.
A colleague told me that in KoBo, it was possible for a person to answer the form, and then send it back to them for changes and/or validation of the information, through a link generated at the time of sending this form. (this link would be the previously answered form)
I would like that the organizationâs focal point could fill out and submit the form, and after two months I could send it back to them with the information answered and they could validate it and/or change it, if necessary.
Hi @Kal_Lam the other day I commented on the post you reference - can you please confirm, how long does that edit URL (that youâve generated manually) last? From other posts I thought it is only intended to last for 30s before it expires. We too are trying to solve same problem of getting a list of edit links (though in our case itâs only because it seems that the âeditâ view is the only one that shows the submitted data in Enketo layout)
Would appreciate your insights re longevity of the edit URL - thanks!
At my end i could use the edit URL link for 1 edit. The time did not matter here as i could even edit it after 1 minutes. The main thing i have noticed here is that you are able to edit your submissions only once with the edit URL. For the next time you will have to go back and then again generate the edit URL. That again works for another edit. So the same cycle keeps following.
Thanks for taking a look @Kal_Lam ! Hmm, in @martijnr 's post on Access Enketo API functionality through KoboToolbox - #6 by martijnr he stated that it was a configuration option that should only be set at 30s - do you know if the server you were testing on had a different config or if the time restriction has since been removed on the code side?
In any case Iâd still love to have an option to âviewâ a submission in Enketo without having âeditâ permissions (per the suggestion box) but good to know that the edit URL sticks around for longer on the server you were using. Will give it anothernother go on the one Iâm on. Cheers!
@nat i tried the same in our public server i.e. HHI server. Thus the same should also be with the OCHA server.
Regarding your featureâs request please be informed that i have compiled them. Thank you once again for your wonderful suggestion and all the support provided to the community!
Hello @Kal_Lam Iâve been trying to find out why I canât access the form, and @nat is right, after 30s the link is not active anymore. I need a workaround.
This is very veeeery important for our form. We donât know when the organisations and public institutions. are going to review the form and we really need them not to have to enter all the information again and again, we need them to change just if necessary.
Pleeeeaaseee how can I solve this???
I was able to reproduce what you are bringing up. As Martijn points out here, this is essentially a security feature to ensure that the forms donât remain editable for long.
I tried using Johnâs workaround from here but it seems the filtering doesnât work as it used to (or at least in my tests â perhaps this is a bug!).
As a work around, this isnât a great, user-friendly solution, but it works despite the filtering issue. If you know how to use a terminal, you can do the following whenever you are needing a new edit link:
Thank you josh! But it doesnât solve the problem, we do not know when will the organization be able to access the form, and with Venezuelaâs internet I donât know if it will take longer than 30s to access the form
El El lun, 1 de feb. de 2021 a la(s) 9:44 p. m., Joshua Beretta via KoBoToolbox Community Forum <noreply@community.kobotoolbox.org> escribiĂł:
Thanks @Josh for the script! In the end (as I had business users) I went with a manual solution but with formulae to help people go directly to âedit viewâ of the particular submissions they needed at the time they needed to:
I
Downloaded the submissions data in Excel format
Got the $PARENT_UID you refer to above just by going into the UI and clicking on âeditâ and watching the network requests in browser console to find the string (this is the part most business users would need a hand with)
Created a formula in Excel to give the hyperlink to get the edit URL for each submission: =HYPERLINK("https://kf.kobotoolbox.org/api/v2/assets/"&[$PARENT_UID string I had got above]&"/data/"&[$ID from data download]&"/edit/")
(I had also used a formula based on the data in the download to construct the filename I wanted the pdf saved as)
I could then give the business users the following instructions:
Log into KoBo in your browser like normal
Copy the Get_Edit_URL field into your browser address bar (I find that copying and pasting the URL works better than just clicking on the hyperlink to open it via Excel). Youâll see something like the below:
Save as pdf - you can copy and paste the âFilename to useâ to make it easier to get the right filename
Notes:
if in step 2 you see a URL but itâs not a clickable link then either use Firefox browser or install a JSON plugin to Chrome (e.g. this one) to make it clickable
if in step 2 you see the below then hit refresh in a few seconds and it will eventually give you a new URL (likely about 30s before it works again)
@analucia_espinoza note re the above method - as far as I can tell it doesnât matter how long the form takes to download once youâve clicked on the edit link, or how long the user takes to edit once the form is opened - the key is that once youâve created an Edit URL via step 2 above then you have 30s to click on it to start the edit process - and also you wonât be able to get another Edit URL for that same submission record until 30s have passed. Good luck!
Thanks for your great solution @nat. Note that if your goal is to just download a PDF of the filled in form, you could also automate it and send your client the PDF rather than a link. You could do something like the following (assuming you have Google Chrome and macOS â adjust accordingly):
I know this is pretty tangential to the topic here, but specifying filters like q={"_uuid":"952d24f5-26d0-4cc1-9c30-09b997e9703e"} and which fields to return, like fields=["_id"], is pretty fundamental to the data API. What was the issue?
More to the point, @natâs solution seems like a great one, but it does require that the person editing have permission to edit (any) submission in the project. @analucia_espinoza, does this work for you, or were you looking for something more like a single-use link that anyone could use (without logging in) to edit a specific submission one time only?
(@Josh, if itâs the latter, could you distill this into a feature request? This is the kind of thing we have no plans to build yet, but itâd be great to have on our radar.)