Feature Upgrade: Starting with CSPro 7.0, you should no longer use this function as it will soon be removed from CSPro. To replicate the behavior of the function, you must use: syncconnect, syncfile, and syncdisconnect.
b = sync
function launches a data synchronization script
on Android devices. These scripts can transfer data with FTP servers, Dropbox accounts, or other Android devices via Bluetooth. By executing a synchronization script in logic, you can create a dynamic operational control system for your survey operation. (Syncs can also be executed manually.)
argumnet is a string expression pointing to the file name of the .pnc file
script. The file can exist anywhere on the Android device. If it is not found at the path provided, CSEntry will check if a file with the given name exists in the CSEntry sandbox. Using this sandbox functionality, you can execute synchronization files that have been downloaded via the New Synchronization
menus in CSEntry.
An optional argument, queue, indicates that this synchronization script should not be executed immediately, but instead should be executed when the data entry application has closed. This can be useful if you want to synchronize files that may be open in your data entry application. (It is not possible to sync files that are currently open because they are locked and inaccessible to the synchronization system.)
The function returns a logical value of 1 (true) if the synchronization (or the queueing of the file) was successful and 0 (false) if not.
// at the beginning of the program, queue up the synchronization script for
// execution when the program ends
("Send Data to FTP Server.pnc"
// close the external dictionary file so that it can be read by the synchronization script
(pncFile,"External Dictionary Sync.pnc"
("The sync was successful!"
(EXTERNAL_DICT); // reopen the external dictionary file