Two questions about partial save

Discussions about CSEntry
Post Reply
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Two questions about partial save

Post by Keith Tomlin »

Hi - I'm using the savepartial function in my logic to enable me to return to a case to compete interviews. On re-opening the case I get the dialog box "This is a partially saved case. Do you want to go to the last position?" with Yes/No options. Is there any way to suppress this message? I always want the user to go to the last position - with no option - because that will take them to a "navigation" field from which they can select individuals within the case.

Also, in the Android version, is it possible to suppress the red "incomplete" message alongside partially-saved cases in the case listing? As this will not be accurate when cases have been exited early because of individuals being too ill to interview, etc.

Many thanks

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

Re: Two questions about partial save

Post by Gregory Martin »

Right now there is no way to suppress the red incomplete warnings. If a case has been exited early, can you quit out of it naturally, using the endlevel statement, rather than keeping it in partial save mode?

If you want to suppress those messages, you have to add an OnStop function to your program. See more here: http://csprousers.org/help/html/onstop_ ... nction.htm
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Re: Two questions about partial save

Post by Keith Tomlin »

Hi Greg

Thanks for your thoughts on this. Rather than using partial save, I did try using the endlevel statement to exit the case at the navigation field and then, when re-entering the case, using advance to return to the navigation field. My problem then was that any data which was subsequently entered wasn't saved. The only way I've found to exit the case and save additional data is to use savepartial(); and stop(0) when exiting the navigation field;

I did try using the OnStop function under global to supress the dialog box, and place the command to advance to the navigation field within it, but that just seems to take me to the very beginning of the case, rather than to the navigation field. I'm not quite sure what should go into the OnStop function in order to just suppress the "return to last position" dialog.

Thanks

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

Re: Two questions about partial save

Post by Gregory Martin »

If you just want to suppress the dialog, you can add an empty OnStop function:
function OnStop()
end;
If you have no advance statement in the OnStop function, then CSEntry will start up at the first field.

Regarding the endlevel ... can you write logic so that when your case is finished, you simply advance to the end of the program? Something like this:
PROC NAVIGATION

    
if NAVIGATION = 99 then // questionnaire is complete
        advance;
    
    
else
        
// do other things
        
    
endif;
Post Reply