Page 1 of 1

Transfer data between questionnaires linked by a menu on Android

Posted: March 21st, 2018, 12:12 pm
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?

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

Posted: March 21st, 2018, 3:44 pm
by htuser
Have you used household questionnaire as an external dictionary of male/female questionnaires?

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

Posted: March 22nd, 2018, 12:00 pm
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?

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

Posted: March 22nd, 2018, 4:03 pm
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?

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

Posted: March 23rd, 2018, 1:35 pm
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);

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

Posted: March 23rd, 2018, 3:24 pm
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");

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

Posted: March 27th, 2018, 9:51 am
by cspronatasha
Thanks!