• <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
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
        • SyncConnect Function
        • SyncConnect Function (CSWeb)
        • SyncConnect Function (Bluetooth)
        • SyncConnect Function (Dropbox)
        • SyncConnect Function (LocalDropbox)
        • SyncConnect Function (LocalFiles)
        • SyncConnect Function (FTP)
        • SyncServer Function
        • SyncDisconnect Function
        • SyncData Function
        • SyncFile Function
        • SyncMessage Function
        • SyncParadata Function
        • SyncApp Function
        • SyncTime Function
        • GetBluetoothName Function
        • SetBluetoothName Function
    • 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>

SetBluetoothName Function

Format
b = setbluetoothname(bluetooth_name);
Description
The setbluetoothname function modifies the name of the device as broadcast to other Bluetooth devices, setting it to the string expression bluetooth_name. When other Bluetooth-enabled devices scan for nearby devices to connect to, this is the name that they will see.
When using Bluetooth for synchronization between two devices, the Bluetooth name of the device is what is shown in the screen asking the user which device to connect to. The Bluetooth name of one device may be passed as an argument to the syncconnect function on the other device in order to connect directly to that device, bypassing the screen asking the user which device to connect to.
On Windows, you may need to run your application with administrative privileges to successfully change the Bluetooth name.
Return Value
The function returns a logical value of 1 (true) if the Bluetooth name was set and 0 (false) on error.
Example
// set the Bluetooth name to the staff ID prior to syncing
setbluetoothname(maketext("NSO Device %v", STAFF_ID));

syncserver(Bluetooth);
See also: GetBluetoothName Function, SyncConnect Function (Bluetooth)