Condition on exit after partial save

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Condition on exit after partial save

Post by Boni »

Dear all !!!
I would like to know how to put a condition at the exit of the application after partial save. For example, I joined an external dictionary of Status, I can put a function at the global Postproc, for the end of the questionnaire (completely filled) the variable "Result Status" = "Complete" then I would like to do the same thing with partial save, but it does not work.In fact, I want to update the status file with each partial Save because I want to know the status of each questionnaire before revive it.
I want to make a trick of the genre, at the exit after partial save:

Postproc HOUSEHOLD_FF
if ispartial() then
hhStatusCode = 2;
Writecase (Status_Dict);
endif;


How can it walk, please?
Sincerely yours !
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Condition on exit after partial save

Post by Gregory Martin »

I suggest that you put code like this in your level preproc/postproc, something like this:
PROC CENSUS_LEVEL

preproc

    // when the case is opened, set the status to partially saved
   
CASE_PARTIALLY_SAVED = 1;

    // after this, any time the case is partially saved, this flag will be set to 1

postproc

    // when the entire case is completed, right before the case is saved, modify
    // that flag to indicate that it is no longer partially saved
   
CASE_PARTIALLY_SAVED = 0;
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Re: Condition on exit after partial save

Post by Boni »

Thank you dear Gregory !
Sincerely yours !
Post Reply