• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • Data Requirements
      • CSPro Program Structure
      • Programming Standards
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
      • Logic
      • Language Elements
        • Version
        • Delimiters
        • Comments
        • Preprocessor
        • Variables and Constants
          • Data Items
          • This Item ($)
          • Subscripts
          • Numbers
          • Boolean Values
          • Special Values
          • Refused Value
          • String Literals
          • Newline Handling
        • Expressions
        • Operators
        • Files
        • Miscellaneous
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Refused Value

The value refused is a special value that has been defined in the value set and is treated in several special ways by CSPro and CSEntry.
Displaying Refused Values in Response Lists
During data collection, CSEntry will show refused values in capture types by default, just as it displays other values defined in a value set. However, to make it harder for an operator to select a refused value, it is possible to turn off the default displaying of refusals. If turned off, the operator must select CSEntry's Show Refusal Options menu option to see any defined refused values.
Using Refused in Logic
As with other special values, the number defined as refused cannot be used in logic comparisons. For example, if TRIBE has the value -99 defined as refused, then in logic:
if TRIBE = -99 then // does not work

if TRIBE = refused then // works
Overriding the Selection of Refusals
Advanced users may want to have more control over when a refused value can be entered. If a function is defined in logic with the name OnRefused, CSEntry will call this function every time a refused value is selected. If the function returns 0 (false), then the function will prevent the entry of that refusal. For example:
function OnRefused()

   
string probe_text = maketext("Are you sure that you want to select Refused for %s? "
                                 
"Remember the approaches discussed in training about "
                                 
"trying to get answers for all questions.", getlabel());

   
when warning("%s", probe_text) select("Yes", continue, "No", continue) default(1);
         
1 -> exit true;
           -> 
exit false;
   
endwhen;

end;
See also: Special Values