How to delete wrongly entered variable

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
manojorb

How to delete wrongly entered variable

Post by manojorb »

This is 5 variable Q01, Q02, Q03, Q04 and Q05.

Q01. [1] Q02. [2] Q03. [url][1] Q04 . [1] Q05 . [2 ]

If Q02 = 2 then skip to Q05, when a operator wrongly entered in Q02 in 1 and continue……. Q03 and Q04. , When it is wrong to remember then beck to Q02 and enter 2 then skip to Q05 but Q03 and Q04 response was it like it is, how to delete/control Q03 and Q04 blank/NA


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

Re: How to delete wrongly entered variable

Post by Gregory Martin »

This question gets to the difference between operator and system controlled modes. If you are running your application in system controlled mode, the data that is skipped will remain on the form, though the fields will turn dark gray, indicating that the fields are skipped. When your case is saved to the file, the skipped data will not be saved out, so when you reload the case, it will be gone.

In operator controlled mode, the skipped fields will turn yellow and the data will remain on the form. When the case is saved to the file, the skipped data will be saved with it. This is desirable in some cases.

If you want to remove the data in operator controlled mode, or if you want to immediately remove the data from the form while in system controlled mode, you'll have to use logic to do that, something like:
PROC Q02

    
if Q02 = 2 then
        Q03 =
notappl;
        Q04 =
notappl;
        
skip to Q05;
    
endif;
See this presentation for more information: http://www.csprousers.org/.../03_Planni ... ation.pptx
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: How to delete wrongly entered variable

Post by htuser »

Dear Gregory,
I'm trying do use the special word notappl to delete wrongly entered variable, but, the compiler give me an error message. Does this special word can't be used with string?
Please can you help me with?
Thanks for all,
Attachments
Notappl.zip
(2.87 KiB) Downloaded 430 times
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: How to delete wrongly entered variable

Post by Gregory Martin »

Notappl is only for numeric variables. If you want to delete the contents of a string, simply set it to a blank string, like this:
CULTURE_1 = "";
Post Reply