Help to sync in dropbox!

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
Koyac
Posts: 1
Joined: June 5th, 2017, 11:14 pm

Help to sync in dropbox!

Post by Koyac »

Dear All,

I could help by giving me a guide on how to synchronize through dropbox with the current version of cspro, I follow the indications that is in the help option but until now it does not work


I attach the application I try to synchronize
Attachments
DATA ENTRY APLICATIVO MOVIL v7.rar
(32.62 KiB) Downloaded 320 times
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Help to sync in dropbox!

Post by khurshid.arshad »

Dear Koyac;

Your syntax will be look like this:

Code: Select all


PROC GLOBAL 

function synwithdropbox();
if syncconnect(Dropbox) then
    // get the latest versions of the application files from Dropbox
    syncfile(GET,"/CAJAS SAGA.pff");
    syncfile(GET,"/CAJAS SAGA.pen");

    // send the latest cases to Dropbox
    //syncdata(PUT,CAJAS_DICT); --- > ERROR:  Invalid function call (external dictionary name expected) near line 12 in CAJAS_FF procedure

    syncdisconnect();

endif;
end;

Code: Select all

Preproc
synwithdropbox();
You cannot use syncconnect in proc global. You can either use it in any of the data entry events like preproc, postproc etc . Or Use syncconnect in a user-defined function and call the user-defined function from any of the data entry events. (response by savy; June 1st 2017)

for further help please see following links:
http://www.csprousers.org/forum/viewtop ... =11&t=1925
http://www.csprousers.org/forum/viewtop ... =11&t=1937
a.
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Help to sync in dropbox!

Post by khurshid.arshad »

Please use this for function call.

Code: Select all

PROC CAJAS_FF
Preproc
synwithdropbox();
a.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Help to sync in dropbox!

Post by josh »

Since you are only updating the data file, the pen file and the pff file, there is no reason to use logic for this synchronization. You can simply set this up using the "Synchronization Options" dialog in CSPro designer. You only need to use logic for synchronization if you need to sync multiple data files, additional program files or if you are using Bluetooth. In CSPro designer, choose Synchronization from the Options menu, choose Dropbox as the server type, check the box for "Download application files" and enter "/" for the "Path to application server". Save and publish your application. When you run the application, from the case list screen choose sync from the toolbar/menu and CSPro will sync your application. You can then download the data that was synced using the DataViewer tool. No need to write any logic. You can look in the help for "Synchronization Options" for more details.
Post Reply