Page 1 of 1

block a case once completed, can it be ??

Posted: January 3rd, 2018, 11:09 am
by juan pablo
Good morning dear team

My question is the following:

* Can a case be blocked once completed ???
that is, that the pollster can not re-enter the survey / completed case

It would be very helpful if you could do that,

Thank you !!

Re: block a case once completed, can it be ??

Posted: January 3rd, 2018, 11:50 pm
by khurshid.arshad
Dear

Please see this post.

http://www.csprousers.org/forum/viewtop ... case#p6254

and see help "DataEntryIDs"

Best.
a.

Re: block a case once completed, can it be ??

Posted: January 4th, 2018, 10:20 am
by juan pablo
Dear
thanks for the suggestion
I tried it but the logic is to not be able to eliminate cases
but what I am looking for is that the pollster can not re-enter the case once it is completed in order to avoid manipulation of the data after it is completed.

Re: block a case once completed, can it be ??

Posted: January 4th, 2018, 10:35 am
by juan pablo
Dear

  I found a way to block the modification of cases
but this is in general, it blocks me both full and partial cases

and what I need is for you to block only the complete cases

Re: block a case once completed, can it be ??

Posted: January 4th, 2018, 12:54 pm
by jfigueroa
Hi juan pablo,

I have an idea to try to accomplish what you want.

It requires two steps:

First you have to create a variable on your survey dictionary, for example, "RECORD_STATUS" as Alpha Data Type.
On this variable you will store a word like, "COMPLETED".
This will take place at the Last field of your survey, and have to be set the first time you enter or create a survey record.
Something like:

Code: Select all

PROC MY_LAST_FIELD
If demode() = 1 then
	RECORD_STATUS = "COMPLETED";
Endif;
Then for the second step you have to place a validation on the First field of your survey.

Code: Select all

PROC MY_FIRST_FIELD
Preproc
If RECORD_STATUS = "COMPLETED" Then
	errmsg("User Cannot Modify Completed Records");
	stop(1);
Endif
I haven't tried this logic, I got this idea while I read your post.
But hope this could help.

Regards.

Re: block a case once completed, can it be ??

Posted: January 4th, 2018, 1:43 pm
by Gregory Martin
jfigueroa's suggestion is a good one. To extend it, and to eliminate the use of an alpha, you can:

1) In the postproc of your level (which is triggered at the end of the case), set the flag.

2) In the preproc of your level (which is triggered at the beginning of the case), check the flag.

For example:
PROC SURVEY_QUEST

preproc

if visualvalue(COMPLETED) = 1 then
   errmsg("User Cannot Modify Completed Records");
   stop(1);
endif;

postproc

    COMPLETED = 1;

Re: block a case once completed, can it be ??

Posted: January 4th, 2018, 2:46 pm
by juan pablo
Dear,

jfigueroa and Gregory Martin

thank you very much for your help
helped me a lot the logic that they shared with me

regards,

Juan Pablo