Creating two data file with one External Dictionary

Discussions about CSEntry
Post Reply
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Creating two data file with one External Dictionary

Post by sah »

Hello Team,
I am trying to create two data file with one external dictionary in the menu file using the Cspro 7 so i can have smooth data sync and i need advice. So in my situation, I have a project being conducted in two countries, (Country A and Country B) with same instrument and for simplicity i have done the file creation as one thus Project.csbd but rather I want to have two data files in my dropbox or FTP so I have created my pff files

Code: Select all

filewrite(pffFile,"[Files]");
    filewrite(pffFile,"Application=" + pathname(Application) + "../Entry/Project2017.ent");

      if Country=1 then 
    filewrite(pffFile,"InputData=" + pathname(Application) + "../Data/CountryA.csdb");
   elseif Country =2  then
  filewrite(pffFile,"InputData=" + pathname(Application) + "../Data/CountryB.csdb");
endif;
So when I run the pff, I want to see the two type of datafile but rather I see only one .

The alternative is to create the file as

Code: Select all

 filewrite(pffFile,"InputData=%sProject2017_%0d.csdb" ,surveyDataPath, COUNTRY); 
My problem, is how do i reference this in the sync script.

Regards,
Sah
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Creating two data file with one External Dictionary

Post by josh »

In CSPro7 sync is based on the dictionary name not on the filename. So if you have two different files that use the same dictionary they will get combined into one file on the server. Here are three options to consider:

1) Create a separate Dropbox or FTP login for each country. For all tablets in country A use one login and for tablets in country B use another.

2) Make a copy of your application and rename the dictionary. Use the original in country A and the version with the new dictionary name in country B.

3) Add a variable for the country to the id-items of your dictionary. That way even though you have all the households in one file you can use a batch application to separate them or you can separate them when you export using a universe.
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Re: Creating two data file with one External Dictionary

Post by sah »

Thanks Josh, I was having option 2 in mind, but option 1 looks more simple to handle and manage.
Post Reply