• <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>

Show Function

Format
i = show(ʃheading,ʅgroup_name,item_listʃ,where conditionʅʃ,title(text_list)ʅ);
Description
The show function displays items from a roster in the form of a menu that looks like a roster. The group_name specifies which group contains the items to be displayed, one or more of which are specified in the item_list. This function is similar to the show and accept functions, and is useful as a menu or simply as a way to show roster values in another part of the questionnaire. An optional string expression, heading, defines the title of the grid. An optional where clause, with a specified condition, allows you to only specify that only some occurrences of the roster should be displayed. If you want to override the column headings, you can specify them with string expressions in text_title.
Return Value
The function returns the number of the item selected: 1 for the first item, 2 for the second item, etc. This is the number of the item on the display, not in the roster. The value 0 is returned if the escape key (or back button) is pressed and none of the options is chosen.
Example 1
if RELATIONSHIP = 2 and SEX = SEX(ptrHead) then
   
show("Sex of spouse is the same as the sex of head!",PERSON_REC,NAME,RELATIONSHIP,SEX,AGE,
       
title("Name","Rel","Sex","Age"));
endif;
Example 2
if ctrHead > 1 then // more than 1 head in the household
    errmsg("More than 1 head of household (count=%d)",ctrHead);
   
numeric headToDelete = show(PERSON_REC, NAME, RELATIONSHIP, SEX, AGE, where RELATIONSHIP = 1);
   
// ...
endif;
See also: Accept Function, ShowArray Function, List.show Function