Cspro reset my inputData each time i run .pff on android, why ?

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
thierryt
Posts: 47
Joined: April 26th, 2017, 12:17 pm

Cspro reset my inputData each time i run .pff on android, why ?

Post by thierryt »

Hi !
I have a problem with a data file whom CSpro automatically delete when i run the .pff.
I have 2 .pff : menu.pff and survey.pff
I run menu.pff to collect some informations used to generate the survey.pff and run it.
I faced a problem in android (the program is working good on windows).
At each time when i run menu.pff, the inputData of survey.pff is reset (the previous data are deleted), i dont know why, the problem only occur in android.
I don’t know if it is due to the fact that i use an external_dict (suivi.dcf) both in menu.pff and survey.pff. the file suivi.dat contains the list of household assigned to an interviewer.
Please is there a reason of that problem ? and what can i do ?
Thanks !
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Cspro reset my inputData each time i run .pff on android, why ?

Post by josh »

Hard to say without seeing your application. We have made many applications with menu applications that use lookup files. I would look for any places you call setfile with the "create" flag as that will erase the file content as well as any place you call "deletefile". I would also double check the paths that you are using to your files including paths that you generate in your pff file. They may be different on Android and Windows depending on how you deploy your application.
thierryt
Posts: 47
Joined: April 26th, 2017, 12:17 pm

Re: Cspro reset my inputData each time i run .pff on android, why ?

Post by thierryt »

Hi Josh,
i had formatted the tablet, and the application is running well, for now, no date have been deleted, but i am afraid because i don't why the data has disappear the first time.
In my computer there is no problem !
Thanks !
thierryt
Posts: 47
Joined: April 26th, 2017, 12:17 pm

Re: Cspro reset my inputData each time i run .pff on android, why ?

Post by thierryt »

Finally,
the solution was not the formatting of my tablet, because when i started a new cluster the data file was also deleted.
i look well to see what could be the problem and thanks God because i saw that the problem is the function Find when it is used in the input_dict.
if the data file has been create in windows and copy on android, after using find function, there is no problem.
But when the data file is create for the first time in android, when you finish to collect and retrun run menu.pff, it create an empty data file.

So, please look very well that function Find.

this is the part of code in my survey.ent who work well on windows but not in android

killfocus
string ident1 = edit1("G4",maxvalue(G4)) + edit1("G7",maxvalue(G7));

if find(SURVEY_DICT,=,ident1) and HHAlreadyExist= 1 then
errmsg("This household has already been interviewed, select another household !");
$ = notappl;
move to g1;
endif;
Post Reply