• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • Synchronization
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Numeric Values
      • String Values
      • 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
      • StringWriter 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
        • SyncServer Function
        • SyncDisconnect Function
        • SyncData Function
        • SyncFile Function
        • SyncMessage Function
        • SyncParadata Function
        • SyncApp Function
        • SyncTime Function
        • GetBluetoothName Function
        • SetBluetoothName Function
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

SyncParadata Function

Format
b = syncparadata(direction);
Description
The syncparadata function transfers paradata between a device and a synchronization service. Before calling syncparadata, you must first connect to the service by calling syncconnect.
The function can upload paradata from the local device (client) to the service as well as download paradata from the service. The direction argument determines which of these operations is performed. It must be one of the following values:
  • GET: Download any paradata that was sent to the service since the last synchronization and add it to the currently open paradata log.
  • PUT: Upload to the service any paradata that has been collected since the last synchronization.
  • BOTH: Synchronize paradata in the currently open paradata log with the service in both directions (i.e., perform both a GET and a PUT).
The syncparadata function keeps track of what paradata has been transferred each time the client and service synchronize. This information is used to only transfer paradata that has been collected since the last synchronization. This significantly reduces the amount of data transferred and therefore reduces bandwidth and the cost of air time.
Paradata logs can be very large so be careful when adding paradata synchronization to an application. If you are interested in syncing paradata, a general suggestion is to use BOTH when syncing between devices using Bluetooth, and to use PUT for CSWeb, Dropbox, or FTP.
This is a CSPro logic function. Similar functionality is available using the Sync.syncParadata action. When using actions, multiple synchronization sessions can be created, whereas using CSPro logic, there is only one session per call to syncconnect.
Return Value
The function returns a logical value of 1 (true) if the transfer was successful and 0 (false) otherwise.
Example
if syncconnect("Bluetooth") then

   
// other sync actions...

   
syncparadata(BOTH);

   
syncdisconnect();

endif;
See also: Synchronization Overview, SyncData Function, Paradata, paradata Function, Sync.syncParadata Action