Search found 1329 matches

by Gregory Martin
July 13th, 2020, 10:24 am
Forum: Entry
Topic: Modify fields only by going backwards
Replies: 2
Views: 72

Re: Modify fields only by going backwards

You can also conditionally protect the field: PROC FIELD_2 preproc numeric moving_forward = true ; onfocus if moving_forward and visualvalue (FIELD_2) <> notappl then protect ( true ); else protect ( false ); endif ; moving_forward = false ;
by Gregory Martin
July 8th, 2020, 4:41 pm
Forum: Entry
Topic: Display the notes with csdb
Replies: 5
Views: 152

Re: Display the notes with csdb

You can use Data Viewer to export the notes to another CSPro data file, at which point you can view them. See here: https://www.csprousers.org/help/DataViewer/converting_data_files_to_other_formats.html By selecting Notes from the File / Save As menu, you can extract a data file's notes. Based on th...
by Gregory Martin
July 8th, 2020, 8:46 am
Forum: Feature Requests
Topic: File Dialog
Replies: 2
Views: 56

Re: File Dialog

You can build one yourself with a little CSPro: list string data_files; dirlist (data_files, "../Data/*.csdb" ); if data_files.length() > 0 then numeric selection = data_files.show( "Which file do you want to sync?" ); if selection > 0 then // do something with data_files(selection) endif ; endif ;
by Gregory Martin
July 2nd, 2020, 1:57 pm
Forum: Entry
Topic: Assign two or more data files to a dictionary
Replies: 5
Views: 219

Re: Assign two or more data files to a dictionary

How about creating a function where you do your loop:
function RunTask(string data_filename)

   
setfile(DICT_NAME, data_filename);

    // do something

end;

// ...

RunTask("file1.csdb");
RunTask(
"file2.csdb");
by Gregory Martin
July 2nd, 2020, 1:48 pm
Forum: Entry
Topic: Merge two report files to get one file to display
Replies: 2
Views: 111

Re: Merge two report files to get one file to display

You can use the fileconcat function:
fileconcat("combined_report.txt", "part1.txt", "part2.txt");
by Gregory Martin
June 30th, 2020, 1:35 pm
Forum: Entry
Topic: Deleting particular Case in Entry App
Replies: 2
Views: 137

Re: Deleting particular Case in Entry App

The loop and delete calls seem okay. I would be worried about how you're using the date of interview though. It's generally best to use dates in the format YYYYMMDD if you want to do comparisons. Your code, for example, would not delete a case from 27 May because 27052020 is not <= 26062020. You wil...
by Gregory Martin
June 30th, 2020, 7:27 am
Forum: Android
Topic: Batch Edit application on Android devise
Replies: 2
Views: 122

Re: Batch Edit application on Android devise

Right now Android only supports data entry (CSEntry). However, you can loop through every case in your file if you have the dictionary as an external dictionary. You can do something like this: forcase DICT_NAME do // do something endfor ; If you wanted to modify data, you could do this, though it w...
by Gregory Martin
June 29th, 2020, 7:51 pm
Forum: Entry
Topic: ERROR WITH ID ITEMS IN ANDROID DEVICE
Replies: 6
Views: 215

Re: ERROR WITH ID ITEMS IN ANDROID DEVICE

Great. I'm glad that you were able to get it to work.
by Gregory Martin
June 29th, 2020, 5:35 pm
Forum: Editing
Topic: mutilevel dictionary
Replies: 5
Views: 375

Re: mutilevel dictionary

This is a good illustration of why to avoid multiple-level applications. You shouldn't be able to do this from your first level: numeric hh4 = totocc (hogar); You'll see that you get a compiler error if you do something like this at that same point of code: PLG1 = 1 ; // error: Variable belongs to a...
by Gregory Martin
June 29th, 2020, 5:00 pm
Forum: Entry
Topic: ERROR WITH ID ITEMS IN ANDROID DEVICE
Replies: 6
Views: 215

Re: ERROR WITH ID ITEMS IN ANDROID DEVICE

We didn't receive your email. It might have been blocked by a spam filter. Can you email it directly here: greg@csprousers.org.

Greg