Generate CAPI questions

Discussions about creating CAPI applications to run on Android devices
kawtef
Posts: 4
Joined: March 24th, 2016, 5:54 am

Generate CAPI questions

Postby kawtef » June 28th, 2017, 4:51 am

Hi all,
Is it possible to generate CAPI questions from Dictionnary (item label) without editing CAPI questions for each questions?

Thank in advance

Gregory Martin
Posts: 1050
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Generate CAPI questions

Postby Gregory Martin » July 4th, 2017, 11:21 am

There is no way to do this automatically. If you had some programming skills, you would read in the dictionary (.dcf) and write out the CAPI questions (.qsf) file. They are both text files, but this task would not be trivial.

kakinyim
Posts: 35
Joined: January 16th, 2012, 6:38 am
Location: Nairobi, Herufi House
Contact:

Re: Generate CAPI questions

Postby kakinyim » July 11th, 2017, 1:39 pm

I normally use a combination of excel and Notepad ++ to generate these CAPI questions.

In Excel file (attached), I have two sheets where the I first paste from DCF macro field names and labels. At cell D2, replace the name of your internal name of your dictionary.

You need the following header,
[CAPI QUESTIONS]
Version=CSPro 7.0

[LANGUAGES]
ENG=English

Tags used here are for version 7. Other versions may have different tags, please check by manually generating a QSF file then compare.

Open your app QSF file using a text editor then Copy and paste from sheet two then remove the quotes ("). Save your file and open your app.

This approach has worked for me.
Attachments
Generate CAPI questions QSF from DCF.xls
(57.5 KiB) Downloaded 181 times

kawtef
Posts: 4
Joined: March 24th, 2016, 5:54 am

Re: Generate CAPI questions

Postby kawtef » July 12th, 2017, 4:04 am

Thank you kakinyim,
I will test it.

kakinyim wrote:I normally use a combination of excel and Notepad ++ to generate these CAPI questions.

In Excel file (attached), I have two sheets where the I first paste from DCF macro field names and labels. At cell D2, replace the name of your internal name of your dictionary.

You need the following header,
[CAPI QUESTIONS]
Version=CSPro 7.0

[LANGUAGES]
ENG=English

Tags used here are for version 7. Other versions may have different tags, please check by manually generating a QSF file then compare.

Open your app QSF file using a text editor then Copy and paste from sheet two then remove the quotes ("). Save your file and open your app.

This approach has worked for me.

hannesrr
Posts: 29
Joined: January 8th, 2013, 5:02 pm
Contact:

Re: Generate CAPI questions

Postby hannesrr » February 8th, 2018, 6:59 pm

Excelent post!!
Thank you very much, Its working.
Hannes Rodriguez :geek:

sherrell
Posts: 8
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Generate CAPI questions

Postby sherrell » August 3rd, 2018, 7:30 pm

hey Guys,

I was just searching to see if you have a utility for creating the QSF from the DCF. Doing so would be *really* useful...esp. right now, as I have a series of questionnaires, some of which are 100 pages <ack!>. I've done this before (for smaller QREs) using notepad++ and running a series of macros...but obv. that's a bit tedious.

Is this per chance in the works anytime soon?

Thanks,
Sherrell

josh
Posts: 1651
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Generate CAPI questions

Postby josh » August 4th, 2018, 7:39 am

Sorry, not currently on our radar. Kakinyi's solution is probably your best bet.

sherrell
Posts: 8
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Generate CAPI questions

Postby sherrell » August 10th, 2018, 12:22 pm

ok, thnx Josh; smg


Return to “Android”