Transfer data between questionnaires linked by a menu on Android

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
cspronatasha
Posts: 8
Joined: July 11th, 2017, 2:46 pm

Transfer data between questionnaires linked by a menu on Android

Post by cspronatasha »

I have a menu program that links a household questionnaire to a male and female questionnaire. In the household questionnaire, we have a roster for the household, and a subsequent randomization that picks an "index child" from the roster. On my computer, I am able to transfer this information (roster + randomization result) to the male and female questionnaires, however, on an Android tablet, this function is not working for me. Is there a solution to this?
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Transfer data between questionnaires linked by a menu on Android

Post by htuser »

Have you used household questionnaire as an external dictionary of male/female questionnaires?
G.VOLNY, a CSProuser from Haiti, since 2004
cspronatasha
Posts: 8
Joined: July 11th, 2017, 2:46 pm

Re: Transfer data between questionnaires linked by a menu on Android

Post by cspronatasha »

I am unsure how to use an external dictionary when they are both being collected at the same time - ie, the enumerator is at the household and first goes through the household questionnaire - which would serve as the basis for the look up file for the male and female questionnaires. Is there a way to create this external dictionary and look up in real time?
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Transfer data between questionnaires linked by a menu on Android

Post by aaronw »

I would like refer to your original post. On your computer you say you are able to transfer the information to the male/female questionnaire. How are you doing this and why is it failing on Android?
cspronatasha
Posts: 8
Joined: July 11th, 2017, 2:46 pm

Re: Transfer data between questionnaires linked by a menu on Android

Post by cspronatasha »

Code: Select all

preproc 
Menu=accept("Menu","Household","Male","Female","Anthropometry");
if Menu = 1 then   
    execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\HH\SPIR baseline HH questionnaire.pff"); 
elseif Menu = 2 then
 execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\HH\Exporter_app.exf.pff");
    execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\Male\SPIR baseline MM questionnaire.pff");
elseif Menu = 3 then
 execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\HH\Exporter_app.exf.pff");  
 execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\Female\SPIR Baseline FF Questionnaire.pff");
    elseif Menu = 4 then
 execPFF("F:\IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\Anthropometry\SPIR Baseline Anthropometry.pff");
        endif;
     stop(1);
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Transfer data between questionnaires linked by a menu on Android

Post by aaronw »

Your paths are referring to the F: drive on Windows. We need to construct a path that will work on Windows and Android. We can do this with the pathname function.
execPFF(pathname(application) + "IFPRI\SPIR_Menu\HH_Male_Female_lookup_fixed\HH_Male_Female_lookup_fixed\HH_Male_Female\HH\SPIR baseline HH questionnaire.pff");
cspronatasha
Posts: 8
Joined: July 11th, 2017, 2:46 pm

Re: Transfer data between questionnaires linked by a menu on Android

Post by cspronatasha »

Thanks!
Post Reply