• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
      • Introduction to Data Entry
      • Data Entry Application
      • Data Entry Editing
      • CAPI Data Entry
        • Introduction to CAPI
        • CAPI Features
        • Capture Types
        • Multimedia
        • CAPI Strategies
        • How to ...
          • Create a New CAPI Application
          • Define Languages
          • Organize Forms
          • Enter Question Text
          • Create Fills In Questions
          • Edit Styles
          • Change Formatting
          • Add Images
          • Insert Link In Question Text
          • HTML Question Text
          • Question Text Macros
          • Resource Folders
          • Use Multiple Languages
          • Create Conditional Questions
          • Structure Movement
          • Create Helps for Fields
          • Show Values for Selection
          • Handle Multiple Answers
          • Choose Topic Sections
          • Create General Helps
          • Test Application
      • Network Data Entry
      • Android Data Entry
    • 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>

Create Conditional Questions

By using conditions, it is possible to determine which question to display at runtime based on previous responses.
The bottom window of the question editor is used to add conditions.
Select an item for which you want to add a condition (from the left-hand tree).
  1. Right-click on the blue highlight bar in the condition window.
  2. Choose Add Condition.
  3. Enter a condition.
  4. Enter text for this question in the window above.
  5. Add more conditions, and then question text for each.
When the entry application comes to this question, it will evaluate the first condition. If it is true, then the question text for that condition will be shown to the user. If not, the next condition will be checked, and so on. If no conditions are satisfied (i.e., they are all false), then no question text will be displayed. It is not necessary to add an actual condition; a blank condition will always evaluate true.
Note: Conditions can be any CSPro logic expression that evaluates to a numeric value including dictionary items or variables, and functions. Conditions may be combined using logic operators such as and and or.
For example, to display different question text for a variable in the first row of the roster than in the remaining rows of the roster simply set the first condition to curocc() = 1 and leave the second condition blank. When the application is on the first row of the roster where the occurrence number is equal to one, the first question text will be shown. On subsequent rows, where the current occurrence is greater than one, the first condition will be false so the second question text will be shown.