Operator Controlled vs System Controlled.

Discussions about CSEntry
Cesavhi
Posts: 4
Joined: March 25th, 2018, 12:10 am

Operator Controlled vs System Controlled.

Postby Cesavhi » March 27th, 2018, 9:45 pm

Good morning,

I'd like to ask something about operator controlled and system controlled. I try to use operator controlled in my research before but i ended up to many "force-entry" using left click mouse, so i try to switch to system-controlled for more reliable data entry. But i found that my code in operator-controlled can not be run in system-controlled.

I attach both operator-controlled and system-controlled for more clearer understanding. Both have exact same dictionary, code, and form. But operator-controlled work smoothly while system-controlled fail at the system-check section at the end.

I wish someone can enlighten me regarding this problem. Is there any additional code to make my code in system-controlled work just like operator-controlled one?

Thank you,

Ces.
Attachments
CSPRO SYSTEMCONTROLLED ERROR.rar
(10.63 KiB) Downloaded 29 times
CSPRO OPERATORCONTROLLED WORK.rar
(10.61 KiB) Downloaded 28 times

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

Re: Operator Controlled vs System Controlled.

Postby Gregory Martin » March 28th, 2018, 8:12 am

A big difference between the modes if how skips are handled.

In system-controlled mode, any fields that are skipped over will have a value of notappl. What's happening in your checks, in system-controlled mode, is that in this section many of the CEK... values have been skipped over, so their value is notappl. Your conditional checks will fail when using notappl values.

IF (AP3A + AP3B + AP3C + AP3D) - (AP4A + AP4B + AP4C + AP4D) - (AP5A + AP5B + AP5C + AP5D) = (CEK16a + CEK16b + CEK16c + CEK16d + CEK16e + CEK16f + CEK16g + CEK16h + CEK16I + CEK16J) THEN
    CEK16 = 1;
    endlevel;
ELSEIF (AP3A + AP3B + AP3C + AP3D) - (AP4A + AP4B + AP4C + AP4D) - (AP5A + AP5B + AP5C + AP5D) <> (CEK16a + CEK16b + CEK16c + CEK16d + CEK16e + CEK16f + CEK16g + CEK16h + CEK16I + CEK16J) THEN
    CEK16 = 0;
    errmsg("WRONG!");
    reenter start_check;
ELSE CEK16 = 1;
    endlevel;
ENDIF;


You can do two things:

1) Use the visualvalue function to get the actual value on the form, even if it was skipped over.

2) Treat notappl values as 0. If you execute this code before your checks, then you will get your expected behavior:

setproperty("SpecialValuesZero","Yes");


If you are not using CSPro 7.1, you can do this instead:

set behavior() specialvalues(zero) on;

Cesavhi
Posts: 4
Joined: March 25th, 2018, 12:10 am

Re: Operator Controlled vs System Controlled.

Postby Cesavhi » April 4th, 2018, 3:38 am

Thank you for enlightened me sir Gregory <(_ _)>


Return to “Entry”