Hi Family,
Kindly help me with this issue;.
I have a number of enumerators that I want to deploy to the field to collect data.The assistant I need for now is getting the logic to assigned their enumerator code or name as the name of the Data file instead of HELP_ISSUES.csdb (as general data file name), so that I don't have to necessary go and view the variable that is asking who the enumerator is to know where that particular data file name is coming from. So by looking at the data submission, the data file name alone should tell me from which enumerator or who sent that data for easy identification.
For example I am using one of the enumerator's name on the demo list that I have from the dictionary. Enumerator code 03 and enumerator Name sham.So as soon as sham launches the traffic light or sends the data,his data file name should appear either as sham.csdb or 03.csdb.
By default I now have the data file name as HELP_ISSUES.csdb which is not so specific for me.
I attached the file as usual for your study.
Thank you in advance and I welcome directions and guidance from you seniors.
Sham
Logic to automatically name Data file name by enumerators code or by name
Logic to automatically name Data file name by enumerators code or by name
- Attachments
-
- Data file Name_issues.zip
- (30.61 KiB) Downloaded 104 times
Re: Logic to automatically name Data file name by enumerators code or by name
Hi Sham,
Are you using a MENU ?
Through a menu it is easier to indicate the folder with the name/code of user.
Except for each of them you specify the data file name (manually).
You can do this with your pff file
this is the actual structure (opening with notepad)
////////////////////////////////////////////////////////////
[Run Information]
Version=CSPro 7.7
AppType=Entry
[DataEntryInit]
[Files]
Application=.\issues.ent
InputData=.\HELP_ISSUES.csdb
Paradata=.\issues.cslog
////////////////////////////////////////////////////////////
//You will play on the second to the last line
InputData=.\HELP_ISSUES.csdb
// There you are indicating the file name
InputData=.\SHAM.csdb // instead of InputData=.\HELP_ISSUES.csdb
Are you using a MENU ?
Through a menu it is easier to indicate the folder with the name/code of user.
Except for each of them you specify the data file name (manually).
You can do this with your pff file
this is the actual structure (opening with notepad)
////////////////////////////////////////////////////////////
[Run Information]
Version=CSPro 7.7
AppType=Entry
[DataEntryInit]
[Files]
Application=.\issues.ent
InputData=.\HELP_ISSUES.csdb
Paradata=.\issues.cslog
////////////////////////////////////////////////////////////
//You will play on the second to the last line
InputData=.\HELP_ISSUES.csdb
// There you are indicating the file name
InputData=.\SHAM.csdb // instead of InputData=.\HELP_ISSUES.csdb
Re: Logic to automatically name Data file name by enumerators code or by name
Dear All,
I worked, years ago for dynamic rename of Data file according to enumerator's name with CSPro Dev Team help and support. Here's the basic
It was designed when CSPro version where 6.1, so, since 2015.
Please compile both, menu and main application to .pen and test it. If it don't work, please let me know.
apps. Hope it will help you.
Since i used a more sophisticated way with CSDB name according to device name instead of enumerators.
I don't think it's important to rename data file with enumerator's name since each user can have access only to theirs data using filters.
Best,
I worked, years ago for dynamic rename of Data file according to enumerator's name with CSPro Dev Team help and support. Here's the basic
It was designed when CSPro version where 6.1, so, since 2015.
Please compile both, menu and main application to .pen and test it. If it don't work, please let me know.
apps. Hope it will help you.
Since i used a more sophisticated way with CSDB name according to device name instead of enumerators.
I don't think it's important to rename data file with enumerator's name since each user can have access only to theirs data using filters.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: Logic to automatically name Data file name by enumerators code or by name
Thanks htuser and ares for your support.
I will try and revert.
Am most grateful
I will try and revert.
Am most grateful
Re: Logic to automatically name Data file name by enumerators code or by name
Hi htuser,
Sorry for replying late. I was out of network area couple of weeks ago.
I appreciate your comment and the file you shared for a simple Menu and Data file as well.
However, I compiled the Menu to .pen, did same for the main application as you directed. But unfortunately when i deployed to test it I had an error message which says;
(see attached files).
If you can explain further Sir may be I got it wrong. I need that.
Thank you soo much.
Sham
Sorry for replying late. I was out of network area couple of weeks ago.
I appreciate your comment and the file you shared for a simple Menu and Data file as well.
However, I compiled the Menu to .pen, did same for the main application as you directed. But unfortunately when i deployed to test it I had an error message which says;
(see attached files).
If you can explain further Sir may be I got it wrong. I need that.
Thank you soo much.
Sham
- Attachments
-
- Screenshot_2022-04-30-05-37-58-508.jpeg (92.84 KiB) Viewed 61972 times
Re: Logic to automatically name Data file name by enumerators code or by name
Hi Sham,
The errors concerned pathnames.
Please use clerk01 or clerk02 or clerk04 as operator ID for best result.
Please let me know if all are correct in you devices
Best,
The errors concerned pathnames.
string applicationName = "..\main_application\real_application.pen";
string nom_menu = ".\menu.pen";
string dataFolder = "..\main_application\data\";
string dataMenuFolder = "..\";
string dataFolderpff = "..\main_application\";
string dataFolderap = "..\main_application\";
I correct them and clean some logics. Please receive this working version. string nom_menu = ".\menu.pen";
string dataFolder = "..\main_application\data\";
string dataMenuFolder = "..\";
string dataFolderpff = "..\main_application\";
string dataFolderap = "..\main_application\";
Please use clerk01 or clerk02 or clerk04 as operator ID for best result.
Please let me know if all are correct in you devices
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: Logic to automatically name Data file name by enumerators code or by name
Hi @htuser
I still can't open. It still gives me error.
Maybe short video will do if you can or may be detail step-by-step instructions will also help.
Because I need it.
I couldn't use the menu program you created to open the mail application.
Thank you.
SHam.
I still can't open. It still gives me error.
Maybe short video will do if you can or may be detail step-by-step instructions will also help.
Because I need it.
I couldn't use the menu program you created to open the mail application.
Thank you.
SHam.
Re: Logic to automatically name Data file name by enumerators code or by name
@ Sham,
I test it on my computer and it work.
Please send to me a private message on the forum, so i will try to help you using Teamviewer.
Best,
I test it on my computer and it work.
Please send to me a private message on the forum, so i will try to help you using Teamviewer.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: Logic to automatically name Data file name by enumerators code or by name
@Htuser,
I find it a challenge to sent you a private message as you directed. How do I go about it?.
Or if you don't mind giving me an e-mail address to make life easy. Can I have your email address.
Thanks
I find it a challenge to sent you a private message as you directed. How do I go about it?.
Or if you don't mind giving me an e-mail address to make life easy. Can I have your email address.
Thanks
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Logic to automatically name Data file name by enumerators code or by name
We disabled private messages a couple weeks ago to combat a lot of spam that was coming in. If you want to find someone's email, click on their user name and you'll see a link with the email address used to register the account.