This is a detailed list of changes in CSPro 8.0. For a more general overview, see the readme.txt file located in the CSPro installation folder.
There are some significant breaking changes in CSPro 8.0, so when bringing an existing application to this version, make sure that you are aware of how these changes will impact your application.
- Many specification files are now saved in JSON format, which facilitates working with them in other programming languages or when using other tools. Once you save files in this format, you will not be able to open them in earlier versions of CSPro. A specification file downgrader provides a way to convert some JSON specification files to formats compatible with versions of CSPro up to version CSPro 7.7.
- Dictionary items can be specified using four new data types that correspond to the logic objects introduced in CSPro 7.5 and CSPro 7.7: Audio, Document, Geometry, and Image. Binary dictionary items are an experimental feature and these items can be used in a limited way in logic and cannot be added to forms, but are otherwise supported throughout CSPro, including as part of synchronizations.
- A new framework, the Action Invoker, provides a standard way of running actions from CSPro logic, embedded JavaScript, JavaScript executed from web views, using JSON, or from other Android applications.
- A questionnaire view displays the contents of a case and its components (dictionary, forms, question text) in a read-only mode that facilitates reviewing or printing.
- New logic settings control how multiline comments and string literals are handled, as well as whether strings are right-padded during comparisons. It is also possible to have the compiler enforce case sensitivity of variable names.
- A new tool, CSCode, is a text editor with support for tabbed editing of documents. The tool also facilitates running JavaScript, editing and validating JSON, designing and testing HTML dialogs, validating specification files, and more.
- A new tool, CSView, displays files in a web browser that has access to the Action Invoker. The tool can be launched via a PFF, and is associated with .cshtml files on Windows, so it can be used as a starting point for some programs.
- A new data entry application type, Operational Control Application, facilitates creating "menu" programs. Other new features to simplify working with menu programs include the persistent variable modifier as well as the Always Visual Value field attribute.
- Listing files and frequencies can be written as JSON.
- A new data source, JSON, allows cases to be stored as JSON in a file comprising a single JSON array of case objects. The data source allows duplicate cases (like CSPro DB) but does not support synchronization.
- A new data source, In-Memory, allows for the temporary collection or processing of case data for one or more cases. This case data is stored only in memory and expires at the end of an application's run.
- The New File dialog has been redesigned. Note that the first option has changed to the CAPI Data Entry Application type.
- The Files tab context menu has an option, Pack Application, that simplifies creating a ZIP file of an application's components (by automating the Pack Application process).
- Approximate string matching is used to better suggest symbol and functions names in the logic editor's autocomplete feature as well as in compiler errors.
- The messages defined in message files are now checked for validity while compiling an application. Double-clicking on an error or warning in the compiler output window that originated from an external message file will result in that file being opened in CSCode.
- The menus for editing data entry and batch applications have changed, with a new menu, Code, containing logic-related options, and the CAPI menu renamed to Question Text.
- A new dialog, String Encoder, simplifies working with string literals by encoding and decoding text into a variety of string literal formats. Additionally, the shortcut Ctrl + " pastes the text on the clipboard as a string literal, escaping characters as needed.
- Another new dialog, Path Adjuster, facilitates working with absolute and relative paths in CSPro logic.
- Android devices running CSEntry must be running version 5.0 (Lollipop) or higher.
- Other Android applications can now communicate with CSPro applications using the Action Invoker. Other ways to interact between Android applications has now been documented.
- Production PFFs for the Pack Application tool can now be executed on Android.
- Security restrictions added by Google for Android 11+ devices prevent the SystemApp object from launching most applications. More details, and workarounds, are detailed on the SystemApp.exec page.
- The aspect ratio of photos taken using the device's camera can be modified using the CSEntry.Setting.CameraAspectRatio setting.
- When using the new logic version, CSPro 8.0+:
- Multline comments use /* */ instead of { }.
- String literals allow escape sequences ("line 1\nline 2") and can be defined as verbatim string literals (@"this is a backslash: \").
- When comparing strings using compare, compareNoCase, or operators such as = or <>, the shorter string is no longer right-padded during the comparison (e.g., "a" no longer is equal to "a ").
- Newline characters, now introducible using "\n", are handled throughout CSPro as one would generally expect, but are turned to the Unicode  character when multiline text is not permitted (such as text data files).
- A new variable modifier, persistent, allows logic variables to retain their values from one run of an application to another.
- Two new functions, Symbol.getName and Symbol.getLabel, return a symbol's name or label.
- Two new functions, Symbol.getJson and Symbol.getValueJson, facilitate converting objects to their JSON representation. Another new function, Symbol.updateValueFromJson, allows the modification of objects by specifying a new value using JSON.
- A new function, compareNoCase, complements compare by comparing strings in a case-insensitive manner.
- QR code images can be created using the Barcode.createQRCode and Image.createQRCode functions.
- A new function, Case.view, displays the questionnaire view for a case.
- Additional new functions: Item.getValueLabel, Item.hasValue, and Item.isValid.
- A new function, Map.clear, resets all properties of a Map object.
- The timestamp function can return UNIX time values by parsing RFC 3339 / ISO 8601 strings, or by specifying a specific date value.
- The config variable modifier can now be used with numeric variables, and can be used with variables not declared in PROC GLOBAL.
- Frequency tables can be written directly to templated reports by using the Freq.save function.
- String expressions can be assigned to Document objects.
- Lines written using File.write or filewrite are now terminated with a single "\n" character, no longer with "\r\n".
- The tonumber function processes boolean values, converting "true" to 1 and "false" to 0.
- Double-clicking on an error or warning in the compiler output window that originated from an external logic file while holding the Ctrl button will result in that file being opened in CSCode, no longer Notepad++.
- Some logic features have been removed or are slated for removal:
- Creating dynamic value sets using Array objects has been removed. The ValueSet object should be used instead. When running a .pen file created prior to CSPro 8.0, the functions will execute properly (though this will not be the case in a future release).
- The box / endbox syntax for recoding variables has been removed. When running a .pen file created prior to CSPro 8.0, the functions will execute properly (though this will not be the case in a future release).
- The functions report and setreportdata, used to create reports prior to the introduction of Templated Reports, have been removed. When running a .pen file created prior to CSPro 8.0, the functions will execute properly (though this will not be the case in a future release).
- The itemlist function has been removed. When running a .pen file created prior to CSPro 8.0, the function returns a blank string.
- The type indicators sint, lint, and float can no longer be used when declaring Array objects.
- A new action, execute, executes an action with the action name specified as an argument.
- A new action, registerAccessToken, registers an access token to provide access to the Action Invoker from external callers.
- A new namespace, Application, provides ways to work with applications and their components, with the actions: Application.getFormFile, Application.getQuestionnaireContent, and Application.getQuestionText.
- A new namespace, Clipboard, provides access to the device's clipboard, with the actions: Clipboard.getText and Clipboard.putText.
- A new namespace, Data, provides ways to interact with data sources, with the action: Data.getCase.
- A new namespace, Dictionary, provides ways to work with dictionaries, with the action: Dictionary.getDictionary.
- A new namespace, File, facilitates reading from and writing to files, and provides ways to manipulate files on the file system with the actions: File.copy, File.readBytes, File.readLines, File.readText, File.writeBytes, File.writeLines, and File.writeText.
- A new namespace, Hash, creates hash values with the actions: Hash.createHash and Hash.createMd5.
- A new namespace, Localhost, creates localhost URLs that can be used to serve content from the local file system or from memory with the actions: Localhost.mapActionResult, Localhost.mapFile, Localhost.mapSymbol, and Localhost.mapText.
- A new namespace, Logic, provides ways to interact with CSPro logic and an application's symbols with the actions: Logic.eval, Logic.getSymbol, Logic.getSymbolMetadata, Logic.getSymbolValue, Logic.invoke, and Logic.updateSymbolValue.
- A new namespace, Message, facilitates working with messages and formatting text with the actions: Message.formatText and Message.getText.
- A new namespace, Path, provides ways to query information about the file system or to perform operations on a path with the actions: Path.createDirectory, Path.getDirectoryListing, Path.getPathInfo, Path.getSpecialPaths, Path.selectFile, and Path.showFileDialog.
- A new namespace, Settings, provides ways to set and retrieve settings that persist across application runs with the actions: Settings.getValue and Settings.putValue.
- A new namespace, Sqlite, facilitates working with SQLite databases with the actions: Sqlite.close, Sqlite.exec, Sqlite.open, and Sqlite.rekey.
- A new namespace, System, provides ways to work with system resources with the actions: System.getSharableUri and System.selectDocument.
- A new namespace, UI, provides ways to display HTML dialogs, interact with web views, and otherwise work with the system's user interface with the actions: UI.alert, UI.closeDialog, UI.enumerateWebViews, UI.getDisplayOptions, UI.getInputData, UI.getMaxDisplayDimensions, UI.postWebMessage, UI.setDisplayOptions, UI.showDialog, and UI.view.