Page 1 of 1

Skip some case while synchronizing from server

Posted: March 20th, 2019, 3:28 am
by Bhupender11
Dear CSPro Team,
Is there is any logic by which we download some cases from Ftp server and skip rest of all.

Re: Skip some case while synchronizing from server

Posted: March 20th, 2019, 7:20 am
by Gregory Martin
With FTP and Dropbox sync, your only option is to download all of the cases. CSWeb is the only sync option that allows you to use a universe. The other two options don't have intelligent servers running so it isn't possible to have a universe.

Re: Skip some case while synchronizing from server

Posted: March 20th, 2019, 8:56 pm
by josh
You can use a universe when you call syncdata() with CSWeb, FTP or Dropbox. However, as Greg mentioned, only CSWeb is intelligent enough to do this efficiently. With FTP and Dropbox, all the data will be downloaded to a temporary file and then the cases that do not match the universe will be ignored and the ones that do match the universe will be saved to the data file. With CSWeb, the server only sends the cases that match the universe.

Re: Skip some case while synchronizing from server

Posted: March 25th, 2019, 3:30 am
by Bhupender11
Thanks,
But how can I add universe to this code.
My code is
function syncWithHeadquarters()

if syncconnect(Ftp,"FTP Address","Username","Password") = 1 then

syncdata(GET,DictionaryName);

syncdisconnect();


endif;
end;

I have given "password" and "Date" as a Unique id. And each user have unique password.I want to download only cases which matches the password. For eg.
Here is password "ABC123" and I want to download only cases which have password "ABC123" rest i want to skip then
what my code is for downloading the cases.

Thanks in advance.

Re: Skip some case while synchronizing from server

Posted: March 25th, 2019, 6:10 am
by josh
Universe is a string that matches the start of your case id. So if the id-items in your dictionary are Password followed by Date then you could use a value for password as the universe:

syncdata(GET, DictionaryName, "ABC123");

For this to work password must be the first id-item in your dictionary.

Re: Skip some case while synchronizing from server

Posted: March 26th, 2019, 3:14 am
by Bhupender11
Thanks it's working.