Hi community,
I am a data collector and I have collected many data till now
I have some forms in my ID and which are being access by web and kobocollect app by many juniors.
Now I am facing an issue where I have collected few lines of data in the offline mode, and this data is stored in the xls and csv sheets. The hurdle I am facing right now is to upload this file directly to my kobotool ID.
I tried some responses given previously by the community, but neither of them worked for me.
I am using kf server Right now.
Thanks in advance.
Hi @pushkar718, have you ever tried this one? There is one small difference, the link i used was for the Humanitarian server, as you are using the kf version, you need to use this link to import data: https://kc.kobotoolbox.org/api/v1/submissions.json
If you need more help, let me know
2 Likes
Hi @osmanburcu for the reply, I tried the solution provided by you, and it worked perfectly fine for me. Thank you so much for the help.
I switched to the humanitarian server and tried to insert data with the reference of the YouTube video you provided, and it ran in few trials.
The data is inserted, but I have some media files too (images only) related to the data.
The question remains the same but with another aspect, How to insert the media files so that they are linked to the data respectively.
Hello @osmanburcu,
Many thanks for this. I have an issue with questions within groups. when I apply your method, new columns are created instead of submitting the data to the original column. please have look at the screenshot.
Could you please advise me on this issue?
Best,
Yasser
Hi @Ysr3322
When there is a grouping in the form, you need to adjust the script little bit is not hard. You need to group these questions in the script as well.
{
“id”:“{{Form ID}}”,
“submission” :{
“formhub”: {
“uuid”: “{{Form uuid}}”
},
“Kobo Data Column Name 1”: “{{CSV file Column name}}”,
“Kobo Data Column Name 2”: “{{CSV file Column name}}”,
“Kobo Data Column Name 3”: “{{CSV file Column name}}”,
“Group Name” : {
“name of the question without group name”: {{CSV file Column name}},
“name of the question without group name”: {{CSV file Column name}},
“name of the question without group name”: {{CSV file Column name}}
},
“Kobo Data Column Name 5” : “{{CSV file Column name}}”,
“Kobo Data Column Name 6”: “{{CSV file Column name}}”,
“Kobo Data Column Name 7”: “{{CSV file Column name}}”,
“meta”: {
“instanceID”: “uuid:{{CSV file Column name}}”
}
}
}
2 Likes
Many thanks, that works perfectly.
2 Likes
Hi @osmanburcu again,
Is it possible to submit to submit data with repeat groups?
Thanks in advance.
Best,
Yasser
Hi @Ysr3322, This is not something i could figure out yet. I will let you know if i find something
I figure it out!! but i am not sure how to create an automated importing system because the code below is applicable for manual use. Group names are still mentioned a mentioned above but if it includes repeat questions, questions needs to be placed between [ ] this square bracket as below and each repeat should be between { }. If you check the code below you will get the idea i believe and i will share the xls form for testing if you want.
How to automate it without python script so everyone can use? It is a future problem to solve
a73DJBGBcdDouEPM83biMq.xlsx (6.6 KB)
{
“id”:“{{Form ID}}”,
“submission” :{
“formhub”: {
“uuid”: “{{Form uuid}}”
},
“start”:“2024-05-29”,
“end”:“2024-05-29”,
“Name”: “Test2”,
“surname”: “Test”,
“nationality”: “Testttt”,
“total_number_of_children”: “2”,
“group_kq3gz70”: [
{“Name_001”: “T1”,
“age”:“22”,
“gender”:“f”
},
{“Name_001”: “T2”,
“age”:“55”,
“gender”:“m”
}
],
“meta”: {
“instanceID”: “uuid:deneme1234576”
}
}
}
3 Likes
Many thanks @osmanburcu you made my day!
1 Like