Page 1 of 1

Naming

Posted: March 14th, 2015, 1:36 pm
by RERII
Is there something I can do to the .pff file that when CSPro starts its first work it can name the .dat file after the phone's ID or something like that, just so if Multiple people are sending in files it doesn't mess things up

Re: Naming

Posted: March 16th, 2015, 6:53 am
by josh
Currently there isn't a simple way to do this although this is something we are considering for a future version as it would simplify synchronisation as you have noted.

Most users are taking one of two approaches to handle this issue:

1) In the sync (.pnc) file use a wildcard (%UID%, %DATETIME% or both) in the destination folder for the data file. This way even though the data files have the same name they are put in different folders in Dropbox or on the FTP server. Here is an example:

CreateServerPath=/mysurvey/data/%UID%
ServerPath=/mysurvey/data/%UID%
Put=mydatafile.dat

The %UID% gets replaced with the username so each data file is placed in a different folder on the server so you would end up with:

Dropbox/mysurvey/data/John/mydatafile.dat
Dropbox/mysurvey/data/Bob/mydatafile.dat
Dropbox/mysurvey/data/Mary/mydatafile.dat
etc..

2) Use a separate CSPro data entry application to launch the first. With this approach you have what is often referred to as a "menu" application that gets some information and then writes out a .pff file with a custom data file name and launches the regular data entry application with the function execpff. This is considerably more work than the first approach and takes someone with strong CSPro programming skills. Usually the first application (the launcher) adds additional functionality like running reports, choosing the case from a predefined list of assignments, launching synchronization from logic etc... In such cases the launcher application is needed anyway. In most cases the first approach is much easier.

Re: Naming

Posted: March 18th, 2015, 7:12 am
by RERII
Can you please show me an example of the .pff with the wildcard you were referring to? To be honest with you big brother I've tried my hands at the Menu and I think I need it dummied for me. I came from no idea on Programming whatsoever to creating databases in CSPro. I'm trying my best to make it work because everyone is on and on about ODK but I think CSpro is better. i just wish I had better knowledge to prove it. I'm not on the level of making menus0 and the ministry is considering using ODK its easy to use but CSPro is great. If you can use the // and explain the menu and send the application in a zip file i would be forever grateful. I just wish i could understand better. Which programming language should i learn to better understand CSPro?

Re: Naming

Posted: March 18th, 2015, 10:16 am
by RERII
I forgot I cant even get my sync file to work in the first place. this is aggravating I tell you.

Re: Naming

Posted: March 19th, 2015, 6:42 am
by josh
Menu programs in CSPro are really for advanced users. Here is a link to a simple one however I would highly recommend that you find a local CSPro expert to help you if you have not had experience programming in CSPro. https://www.dropbox.com/s/g2n1phw0hl8x2 ... r.zip?dl=0

Re: Naming

Posted: March 19th, 2015, 10:30 am
by RERII
When i try your program I get the error "application source code not found . Do you want to create a new one?" and when I say yes it aborts the program by telling me its not responding.

Re: Naming

Posted: March 20th, 2015, 5:54 am
by josh
Make sure you extract all the files from the zip file and open it from the extracted files. If you try to open it directly from the zip it will give that error.

Re: Naming

Posted: March 20th, 2015, 1:32 pm
by RERII
you're probably using 6.1 i'm still using 6.01. could it be the case? either way I extracted it and it says the same thing

Re: Naming

Posted: March 20th, 2015, 3:06 pm
by josh
Yes. I was using 6.1. I posted a version that works with 6.0. Here is the link: https://www.dropbox.com/s/g2n1phw0hl8x2 ... r.zip?dl=0

Re: Naming

Posted: March 22nd, 2015, 6:13 pm
by RERII
thanks man i'll start on it tomorrow