Download partial info from CSWEB

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
diaznhugo
Posts: 3
Joined: December 1st, 2016, 7:24 am
Contact:

Download partial info from CSWEB

Postby diaznhugo » July 14th, 2017, 1:40 pm

Hello

I would like to know if it is possible to download partial information of the CSWEB?

Example: only download questionnaires created by a specific user. is possible?

thanks
Hugo Diaz Nuñez
Dominican Republic

josh
Posts: 1040
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Download partial info from CSWEB

Postby josh » July 15th, 2017, 9:02 am

If you use logic for you sync rather than downloading from DataViewer then this it is possible to only download cases who case ids match a certain pattern. You can write a data entry application or a batch application to download the data from CSWeb using the functions synconnect() and syncdata(). When you call syncdata() you can pass a universe string to it. Only cases whose case-ids match the universe string will be downloaded. For example if I have the following cases on the server:

1234
1235
2111

and I call:

syncdata(GET, MYDICT, "123")

then it will download just the first two cases since they start with "123".

For this to work in your case you would have to make the case-ids in your dictionary start with some identifier for the user so that you could use that as the universe.

diaznhugo
Posts: 3
Joined: December 1st, 2016, 7:24 am
Contact:

Re: Download partial info from CSWEB

Postby diaznhugo » July 18th, 2017, 11:47 am

Thank you very much Josh.
I tested it and it worked perfectly
Hugo Diaz Nuñez
Dominican Republic


Return to “Synchronization”