savepartial

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

savepartial

Postby AriSilva » April 21st, 2018, 9:04 am

I have an application that has a menu that calls the real data entry application to do the interview.
In the real application, there is provision to stop the interview (to return later) and the program executes a savepartial.
At this point, the program saves the variable name where the interview should be continued.
The control returns to the menu.
In the menu, the operator decides to continue the partially saved interview, and calls again the real application, in modify mode, passing as a parameter the field name where the interview should restart.
When the real application is executed, the control goes right to the field where it should restart. No problem so far, everything is done pretty well. But...
1. All the previous fields in the flow are not set, they have notappl, with the exception of the string fields, which are set.
2. The totocc of the previous rosters are 0.
3. All the contents of the rosters are also notappl.

This would not be a problem if we did not need to refer to those fields, because the values are there, in the records. But if you need to know for instance, how many persons you have in the questionnaire you are done.

I´ve tried to execute a loadcase, but this is possible only with external dictionaries.

The question is: Is there a way in which we execute a questionnaire in modify mode and have access to all the fields?
Best
Ari
Best
Ari

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

Re: savepartial

Postby AriSilva » April 21st, 2018, 9:30 am

Sorry to bother you folks.
I think I´m using the wrong instructions to go forward. I was using move and skip.
By looking carefully at the help I found that I should use the advance instruction, and it works!!!
The only (minor) side effect problem is that if there is an error or warning message when passing thru the in between fields they are executed.
Best
Ari

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

Re: savepartial

Postby AriSilva » April 23rd, 2018, 11:58 am

Another question in the same subject: save partial.
When you open a data entry program, CSEntry shows the list of existing cases. double If you click in a case that was partially saved, CSEntry asks if you want go to the last position in the case. Perfect. That´s what I need.
In my application, I have this menu that generates a pff to execute the real data entry, writing all the pff elements.
One of them is the StartMode =modify and the case identification.
Is there a way to tell the called program that, if this case was partially saved, I wanted to go directly to the last position?
This is a capi operation, then I set lock=caselisting, which is exactly wht I want.
Best
Ari
Best
Ari

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

Re: savepartial

Postby Gregory Martin » April 24th, 2018, 10:11 am

You could declare an OnStop function, which suppresses the partial save resume dialog, and then implement something yourself, like:

PROC MY_LEVEL

preproc

    if ispartial() then
        advance to getsymbol(savepartial);
    endif;

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

Re: savepartial

Postby AriSilva » April 24th, 2018, 8:15 pm

Is savepartial an internal system variable that could be accessed by the getsymbol function?
Thanks, this is great. It is exactly what I´m looking for, I´ll try it.
I did not see any mention to either (save partial being a system variable and getsymbol(savepartial) ) in the helps.
Best
Ari
Best
Ari

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

Re: savepartial

Postby Gregory Martin » April 27th, 2018, 3:22 pm

It is documented, though perhaps in an odd place. You can see it here:

http://www.csprousers.org/help/CSPro/on ... ction.html


Return to “Entry”