• <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
        • ValueSet Statement
        • ValueSet.add Function
        • ValueSet.remove Function
        • ValueSet.clear Function
        • ValueSet.length Function
        • ValueSet.randomize Function
        • ValueSet.show Function
        • ValueSet.sort Function
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • 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>

ValueSet.show Function

Format
d = valueset_name.show(ʃheadingʅ);
Description
The ValueSet.show function displays the labels from a ValueSet object and returns the code (or index) of the operator's selection. An optional string expression, heading, specifies the title of the window that displays the values. The function is similar to the accept function but with the options taken from the value set's labels. For numeric value sets, the returned value corresponds with the selected label's code. For a string value set, the returned value is the index of the selected label.
Return Value
The function returns the code (or index) of the item selected. If the selected value contains a special value, then that value is returned. The value 0 is returned if the escape key (or back button) is pressed and none of the values is chosen.
Example
ValueSet respondent_query;

do numeric counter = 1 while counter <= count(NAME)
    respondent_query.
add(NAME(counter), LINE_NUMBER(counter));
enddo;

numeric respondent_line_number = respondent_query.show("Who in the household is responding to questions?");
See also: ValueSet Object, Accept Function, Show Function, ShowArray Function, List.show Function