block a case once completed, can it be ??

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

block a case once completed, can it be ??

Post 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 !!
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

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

Post by khurshid.arshad »

Dear

Please see this post.

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

and see help "DataEntryIDs"

Best.
a.
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

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

Post 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.
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

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

Post 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
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

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

Post 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.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

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

Post 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;
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

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

Post 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
Post Reply