| Argument | Description | Types / Required |
| dataId | The resource ID returned by Data.open, or a dictionary name. | number, string
recommended |
| serializationOptions | Options for how the case should be serialized. | object
not required |
The data source is identified using
dataId. If specified as a string, it references the data source that is connected to a dictionary that is part of an application. If specified as a number, it is processed as a
resource ID returned by
Data.open. This typically references non-application data sources. While optional, this should generally be specified explicitly. (If there is only one data source open, the resource ID can be calculated implicitly.)
Because CSPro optimizes the reading of case data, you may need to disable the dictionary's
Read Optimization setting when using this action on external dictionaries or in batch applications.
The action returns the case object.
The action throws an exception if any of its arguments are not specified in a valid form, or if:
- The data source ID is not valid.
- The data source is not connected to a dictionary that is part of an application.
// construct the input needed for the questionnaire view, using the external dictionary
// attached to this application but getting the forms and question text from the disk
string questionnaireViewInput =
maketext("{ \"dictionary\": %s, \"forms\": %s, \"questionText\": %s, \"case\": %s }",
CS.Dictionary.getDictionary(name := "MARINE_DICT"),
CS.Application.getFormFile(path := "Marine Mammals Survey.fmf"),
CS.Application.getQuestionText(path := "Marine Mammals Survey.ent.qsf"),
CS.Data.getCurrentCase(dataId := "MARINE_DICT"));
// pass this input to the questionnaire view
CS.UI.view(path := Path.concat(html, "questionnaire-view", "index.html"),
inputData := @object questionnaireViewInput);