• <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
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
      • Overview
      • Execution Environments
      • Security and Formatting Options
      • Base Actions
      • Application Namespace
      • Clipboard Namespace
      • Data Namespace
      • Dictionary Namespace
      • File Namespace
      • Hash Namespace
      • Localhost Namespace
      • Logic Namespace
      • Message Namespace
        • Message Action Invoker Namespace
        • Message.formatText Action
        • Message.getText Action
      • Path Namespace
      • Settings Namespace
      • Sqlite Namespace
      • System Namespace
      • UI Namespace
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Message.getText Action

Format
s = CS.Message.getText(number := ...ʃ, type := ...ʅʃ, text := ...ʅ)
ArgumentDescriptionTypes / Required
numberThe message number.number
required
typeThe message set to query.
The default value is "user".
string
not required
textDefault text for this message (if not found in a message set).string
not required
Description
The Message.getText action returns the base (unformatted) text for a message defined in a message file. By default, the message text is retrieved from user-defined messages, but by specifying the type as "system" (as opposed to "user"), message text from system messages is returned.
Return Value
The action returns a string containing the message text, or the default text if no message with the number exists. The message text is returned in the current language, if applicable.
Exceptions
The action throws an exception if any of its arguments are not specified in a valid form, or if the message number does not exist in the specified message set and no default message text is provided.
Example (CSPro Logic)
string userMessage = CS.Message.getText(number := 12001,
                                       
text := "Default Text for Message 12001");
Example (JavaScript)
const partialSaveMessage = CS.Message.getText({
    number: 89222,
    type: 
"system"
});
See also: Message Action Invoker Namespace, Message.formatText Action, tr Function