• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
        • Accept Function
        • Advance Statement
        • Ask Statement
        • ChangeKeyboard Function
        • Connection Function
        • DeMode Function
        • Display Orientation
        • EditNote Function
        • EndLevel Statement
        • EndGroup Statement
        • Enter Statement
        • GetCaptureType Function
        • GetCaseLabel Function
        • GetDeviceID Function
        • GetImage Function
        • GetNote Function
        • GetOperatorId Function
        • GetOS Function
        • GetRecord Function
        • GetUserName Function
        • GPS Function
        • Interactive GPS Modes
        • HideOcc Function
        • Highlighted Function
        • InAdvance Function
        • IsPartial Function
        • IsVerified Function
        • Move Statement
        • NoInput Statement
        • OnChangeLanguage Global Function
        • OnChar Global Function
        • OnKey Global Function
        • OnStop Global Function
        • OnSystemMessage Global Function
        • Prompt Function
        • Protect Function
        • PutNote Function
        • RandomizeVS Function
        • Reenter Statement
        • SavePartial Function
        • SelCase Function
        • Set Attributes Statement
        • Set Behavior CanEnter Statement
        • SetCapturePos Function
        • SetCaptureType Function
        • SetCaseLabel Function
        • Set ErrMsg Statement
        • SetFont Function
        • SetOperatorId Function
        • Show Function
        • ShowArray Function
        • ShowOcc Function
        • Skip Statement
        • Userbar Function
        • VisualValue Function
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization 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>

Set Behavior CanEnter Statement

Feature Upgrade: Starting with CSPro 7.1, you should no longer use this function as it may soon be removed from CSPro. To replicate the behavior of the function, you can use the setproperty function with the argument "CanEnterNotAppl" or "CanEnterOutOfRange".

 

Format 1:

set behavior([field-1, ..., field-N]) canenter(notappl|outofrange) on (confirm|noconfirm);

 

Format 2:

set behavior([field-2, ..., field-N]) canenter(notappl|outofrange) off;

 

Description:

The set behavior canenter statement allows the entry of blanks (notappl) for numeric data items during data entry or to bypass the system 'Out of Range' message during data entry. You may wish to enter blanks when answers are missing from the form. You may wish to bypass the system 'Out of Range' message in order to code your own message.

 

If no arguments are specified, then the set behavior statement affects all data items from the point where it is executed onward. To limit its scope, it must be turned on and off at appropriate times. It is possible, however, to specify the name of a field, group, record, form, or dictionary to narrow the scope of the behavior to only fields that fall within the specified object.

 

In operator-controlled applications, notappl defined as a value in the value set for the item usually allows blank to be accepted. In system-controlled applications the set behavior function must be used to allow blanks even if notappl is in the value set.

 

The keywords confirm or noconfirm must be coded when on is used. Confirm means that a message box is displayed asking if it OK to enter this value. Noconfirm means that no message box is displayed.

 

Example 1:

set behavior() canenter(notappl) on (noconfirm);

 

Example 2:

set behavior(AGE,AGE_FIRST_MARRIAGE) canenter(outofrange) on (noconfirm);

set behavior(RELIGION) canenter(notappl) on (noconfirm);

 

See also: Special Values, Invalueset