A menu to choose the household to be interviewed

Discussions about CSEntry
AriSilva
Posts: 132
Joined: July 22nd, 2016, 3:55 pm

A menu to choose the household to be interviewed

Postby AriSilva » January 18th, 2018, 5:36 pm

Hi folks,
I would like to know if anybody had already implemented a csentry application made of two parts:
1. First an apc that reads an external list of addresses, in any format (txt, excel, etc).
2. This app shows the list in the screen, and the interviewer selects the address s/he will do the interview.
3. This fires the second app, which will in fact apply the questionnaire to the household.
I know it is possible, I wanted to see if it is working in the real world.
Best
Ari
Best
Ari

khurshid.arshad
Posts: 312
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

Re: A menu to choose the household to be interviewed

Postby khurshid.arshad » January 18th, 2018, 11:23 pm


AriSilva
Posts: 132
Joined: July 22nd, 2016, 3:55 pm

Re: A menu to choose the household to be interviewed

Postby AriSilva » January 25th, 2018, 4:48 pm

Now I have two applications working, the menu and the data entry. The menu calls the data entry passing the questionnaire number and other info in the pff file.
After finishing entering data, I want to pass back to the menu the result of the interview of that questionnaire, to store it into the database having the list of the questionnaires.
I´m trying to use loadsetting and savesetting, which seems to work, but the problem is that the very first time to start using the applications I need to clear the setting, to start fresh. And I do that at the very beginning of the menu, assuming that the menu app is executed once and stays in memory, but it seems that is not the case.
Best
Ari

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

Re: A menu to choose the household to be interviewed

Postby Gregory Martin » January 26th, 2018, 8:18 am

Can't you do something like this?

string result = loadsetting("RESULT");
savesetting("RESULT","");

if result <> "" then
    // do something with this result
endif;

AriSilva
Posts: 132
Joined: July 22nd, 2016, 3:55 pm

Re: A menu to choose the household to be interviewed

Postby AriSilva » January 26th, 2018, 10:17 am

I don´t think this will solve my problem.
I don´t think I explained it well enough
Let´s figure out the following scenario:
1. In order for the thing to work, when starting the menu, it has to clear the setting, when he calls csentry with the menu.
2. The interviewer then chooses to do an interview, and the menu calls the questionnaire.
3. When the questionnaire finishes, it saves the setting with the result of the interview,
4. This returns the control to the menu, but what it is doing is loading a new and fresh copy of the menu app, which will be "" because this is the very first thing it does when it starts.

In order for this to work, I think, I would need to have another application just to clear the setting at the beginning of the day.

I attached my test application, which it is an adapted copy of the Geneva workshop that Josh sent me.
The key point is in the interviewer_menu and in STATUS_DA_ENTREVISTA in the client app.
Attachments
Perisse.rar
(53.85 KiB) Downloaded 45 times
Best
Ari

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

Re: A menu to choose the household to be interviewed

Postby Gregory Martin » January 26th, 2018, 3:24 pm

I'm confused. If you immediately get the value and clear it, then you will only get a value when the questionnaire returns control to the menu program.

Because it's cleared immediately, when starting the menu from the application listing screen (like at the beginning of the day), it will not be set.

AriSilva
Posts: 132
Joined: July 22nd, 2016, 3:55 pm

Re: A menu to choose the household to be interviewed

Postby AriSilva » January 27th, 2018, 7:11 am

That´s precisely the point.
I need to clear it at the beginning of the day, for instance, or when the menu is started from the csentry icon, NOT when it is started coming back from an interview.
When the menu starts for the first time in the day, the setting must be empty.
Then, when the menu is called by the client (the data entry app), the status of the interview is there, the client did the setting.
Then, at this point, the menu updates the interview status for the previous questionnaire that the client worked with, without any intervention of the operator.
The problem, as I can see it, is that the control returns from the client (data entry) calling a fresh copy of the menu, that is, starting from scratch, it does not retain the variables values, nothing. The behavior of the hole thing is not what I thought, where the menu (caller) calls the client application, and when the client finishes the control returns back to the caller at the point where the call was made, like a function for instance.
As in the execsystem, for instance.
Best
Ari
Best
Ari


Return to “Entry”