Search found 1796 matches

by Gregory Martin
May 1st, 2024, 2:21 pm
Forum: Editing
Topic: set records to blank
Replies: 1
Views: 10

Re: set records to blank

Have you tried to use the "group" name instead of the record name? That is, delete SECTION_101_EDT instead of SECTION_101. Although the error message says that you should be able to delete a record, the record modification functions (insert/delete/sort/etc.) should generally be used on the...
by Gregory Martin
May 1st, 2024, 1:59 pm
Forum: Entry
Topic: CSDB to SQL Database
Replies: 2
Views: 54

Re: CSDB to SQL Database

The CSPro DB file is a SQLite file, so you can open that file in a program such as DB Browser for SQLite and then export the database. (In that tool, you select File -> Export -> Database to SQL file.) Then you should be able to import that SQL file in MariaDB.
by Gregory Martin
April 24th, 2024, 8:14 am
Forum: Editing
Topic: Function to return the count of categories
Replies: 2
Views: 125

Re: Function to return the count of categories

One option is to use a HashMap to keep track of your values, and then count the number of keys in the HashMap, which will tell you how many unique values were added. For example: HashMap relationshipHashMap; PROC PROGRAM_FF errmsg ( "There were %d relationship codes" , relationshipHashMap....
by Gregory Martin
April 23rd, 2024, 3:07 pm
Forum: Entry
Topic: LoadCase
Replies: 2
Views: 62

Re: LoadCase

If the two IDs you have are the first two IDs, you could use use find with startswith. For example, this would tell you if there is an ID that starts with "AB":
if find(MY_DICT, startswith, "AB") then
by Gregory Martin
April 23rd, 2024, 3:02 pm
Forum: Android
Topic: Checkbox
Replies: 6
Views: 507

Re: Checkbox

You can use the negation operator:
if not ischecked("A", LANGUAGES_SPOKEN) then
by Gregory Martin
April 19th, 2024, 5:43 pm
Forum: Android
Topic: Horizontal Radio Button
Replies: 2
Views: 203

Re: Horizontal Radio Button

At the moment, CSPro does not have a built-in capture type that allows you display radio buttons in a horizontal manner.

If you really want this layout, you can try designing a HTML dialog and use HTML/JavaScript to display your options:

https://www.csprousers.org/help/CSPro/h ... ction.html
by Gregory Martin
April 17th, 2024, 7:56 pm
Forum: Entry
Topic: gps distance calculation
Replies: 2
Views: 220

Re: gps distance calculation

Based on your description, my guess is that you are executing this in the preproc of either LAT2 or LON2? If so, you have to use visualvalue for the PROC that you're on. If you're doing this in LON2, you would have to do:
gps(distance, LAT1, LON1, LAT2, visualvalue(LON2))
by Gregory Martin
April 16th, 2024, 12:51 pm
Forum: Android
Topic: Urdu Font
Replies: 4
Views: 1355

Re: Urdu Font

It looks like you can change the font on some Android devices: https://www.androidpolice.com/change-font-android-phone/ I was not able to on my Pixel 7 though, so I'm not sure there's really a great option to modify the font. If you want to build a custom CSEntry and modify the font that we use, you...
by Gregory Martin
April 16th, 2024, 12:34 pm
Forum: Android
Topic: Checkbox
Replies: 6
Views: 507

Re: Checkbox

If you search for "ischecked" on the forum, you'll see some posts about dynamically working with checkbox selections. But even better is to look at the Simple CAPI example included with CSPro. The logic for MAIN_LANGUAGE essentially does what you are asking for: PROC MAIN_LANGUAGE onfocus ...
by Gregory Martin
April 16th, 2024, 12:17 pm
Forum: Entry
Topic: gps function in preproc
Replies: 4
Views: 487

Re: gps function in preproc

You're right that this is a problem. I've fixed it, so if you enable the location, the interactive GPS reading occurs correctly.

We could fix this in a CSPro 8.0.2 release (if we do another minor release). How big a problem is this for your survey operation?