Hi All,
I am new to kobotoolbox. I am working on a kobo data integration part with our user interface application. So far I am successful to get the data but some fields (like radio button list) I am getting value instead of text.
For eg:
Radio1: text: Hi There value:1
Radio2: text: Morning value: 2
In json result, I see above 2 controls value as 1 and 2 instead of “Hi There” and “Morning”.
I used following link to get API reference
https://kc.kobotoolbox.org/api/v1/
using following code to read the data.
var client = new RestClient(koboUrl);
string kuser = WebConfigurationManager.AppSettings[“koboUser”];
string kpwd = WebConfigurationManager.AppSettings[“koboPwd”];
string kfile = WebConfigurationManager.AppSettings[“koboFilePath”];
client.Authenticator = new HttpBasicAuthenticator(kuser, kpwd);
var request = new RestRequest(Method.GET);
request.AddFile(“csv_file”, kfile);
IRestResponse response = client.Execute(request);
return Json(JsonConvert.SerializeObject(response.Content), JsonRequestBehavior.AllowGet);
Please let me know how to get text instead of value.
Thanks
Indra