Search found 1003 matches

by Gregory Martin
July 10th, 2018, 10:56 pm
Forum: Feature Requests
Topic: Do i in x,y,z
Replies: 2
Views: 19

Re: Do i in x,y,z

You could put those values in an array. Something like: PROC GLOBAL numeric NumberValues = 7 ; array Values(NumberValues) = 1 , 570 , 800 , 900 , 1050 , 48560 , 94980 ; // ... do numeric ctr = 1 while ctr <= NumberValues // do something with Values(ctr) enddo ;
by Gregory Martin
July 10th, 2018, 5:22 pm
Forum: Entry
Topic: sqlquery: Insert into issue
Replies: 2
Views: 36

Re: sqlquery: Insert into issue

Your INSERT statement is not valid. See more here:

http://www.sqlitetutorial.net/sqlite-insert/

Your best option is to get a program like DB Browser for SQLite, write and test your queries in it, and then copy the query back into CSPro.
by Gregory Martin
July 6th, 2018, 2:29 pm
Forum: Feature Requests
Topic: Dataviewer - converting and exporting ordered
Replies: 1
Views: 19

Re: Dataviewer - converting and exporting ordered

You can do this in other ways: 1) Simply sort your .csdb file before doing any of these operations. 2) For an Export, add InputOrder=Indexed to the PFF file. For a conversion to text, if you don't care about the notes file or partial save statuses, then you can just create an empty batch application...
by Gregory Martin
July 2nd, 2018, 11:36 am
Forum: Entry
Topic: Sqlquery: create new table in main csdb
Replies: 7
Views: 87

Re: Sqlquery: create new table in main csdb

SqlQuery can return a string value. See the example in the help: "Example - Query on CSPro DB File, Storing Results in List."

You can get the string value returned as the single and only element of the string list.
by Gregory Martin
July 2nd, 2018, 7:40 am
Forum: Entry
Topic: Sqlquery: create new table in main csdb
Replies: 7
Views: 87

Re: Sqlquery: create new table in main csdb

You can execute any valid SQLite statement using the SqlQuery function, so you could do something like "CREATE TABLE..." You won't be able to use WriteCase with this file though, as that only works with .csdb files described by CSPro dictionaries. At one point we thought about allowing the...
by Gregory Martin
July 1st, 2018, 12:31 pm
Forum: Editing
Topic: SysTime & SysDate functions
Replies: 2
Views: 61

Re: SysTime & SysDate functions

You can do something like this:

PROC FIRST_TIME

preproc

    if visualvalue(FIRST_TIME) = notappl then
        FIRST_TIME = systime();
    endif;
by Gregory Martin
June 25th, 2018, 7:56 am
Forum: Entry
Topic: How to Prefill the Name of Household Head and telephone Number from a lookup file
Replies: 7
Views: 150

Re: How to Prefill the Name of Household Head and telephone Number from a lookup file

If you want to look up a specific case in a file, then you have to call loadcase with parameters. I didn't download your file, but based on the code posted, I would imagine that you would want to do something like this: CLUSTER_NO = HH1; HHNO = HH2; if LOADCASE (ASSIGNED_CNUM_HHNUM_DICT, CLUSTER...
by Gregory Martin
June 25th, 2018, 7:24 am
Forum: Entry
Topic: How to add lookup data for Android version
Replies: 4
Views: 87

Re: How to add lookup data for Android version

You can add your lookup data in a resource folder. If you do this, it will get packed with your .pen file. See more here:

http://www.csprousers.org/help/CSPro/re ... lders.html
by Gregory Martin
June 15th, 2018, 10:30 am
Forum: Editing
Topic: loadcase problem
Replies: 4
Views: 146

Re: loadcase problem

The problem is that your lookup file is not a valid CSPro file. You are clearly constructing it with some other software, so here are three things to keep in mind: 1) The file should have the encoding UTF-8 with BOM. Your file is UTF-8 without BOM. 2) OCUPACAO_ID is not in the right position. In you...
by Gregory Martin
June 14th, 2018, 3:54 pm
Forum: Editing
Topic: loadcase problem
Replies: 4
Views: 146

Re: loadcase problem

You need to specify the IDs when you're searching for a particular case:

if loadcase(OCUPACAO_DICT, OCUPACAO) then

Go to advanced search