Argument | Description | Types / Required |
name | The name of a form file or dictionary associated with an application, or the name of an application. | string
not required |
key | The key (case IDs) of a specific case to attach to the questionnaire content. | string
not required |
uuid | The UUID of a specific case to attach to the questionnaire content. | string
not required |
serializationOptions | Options for how the case should be serialized (if applicable). | object
not required |
- The dictionary, returned with the name "dictionary".
- The form file, returned with the name "forms".
- The question text, returned with the name "questionText". This is only included when name specifies an entity that is associated with a data entry application that uses question text.
- The case, returned with the name "case". The optional serializationOptions argument allows you to specify how the case should be serialized, potentially overriding the default application settings.
If
name is not specified, the questionnaire content associated with the application's
main dictionary is returned.
If neither key nor uuid are specified, the current case associated with the dictionary is returned. If one of those arguments is specified, the case identified by that argument is returned. If both key and uuid are specified, then the uuid value is prioritized.
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 questionnaire content with the dictionary, forms, and, if available, the question text and case data.
The action throws an exception if any of its arguments are not specified in a valid form, or if:
- No dictionary, or associated dictionary, exists with the specified name.
- No case exists as specified by the key or uuid arguments.
- An error occurs while reading the case from the data source.
if selcase("Select a Case to View", CEN2000, "") then
// construct the input needed for the questionnaire view from the selected case
string questionnaireViewInput = CS.Application.getQuestionnaireContent(name := "CEN2000");
// pass this input to the questionnaire view
CS.UI.view(path := Path.concat(html, "questionnaire-view", "index.html"),
inputData := @object questionnaireViewInput);
endif;
Note that although this example demonstrates a use of this action, a simpler way to do the above is: