Codeunit 18060471 EOS054 SurveyJS Mgt.
Codeunit 18060471 EOS054 SurveyJS Mgt.
Methods
PrepareQuestionnaireJSON
procedure PrepareQuestionnaireJSON(var ListOfQuestions: Record "EOS054 Questionnaire Line"): JsonObject
This procedure prepares a SurveyJS compatible JSON file taking questions from the process table
Parameters / Return Value
ListOfQuestions
Record "EOS054 Questionnaire Line"
Returns
JsonObject
SaveJSON
procedure SaveJSON(data: Text; EOSEEDQstnVersions: Record "EOS054 Questionnaire Version")
This procedure prepares a SurveyJS compatible JSON file taking questions from the process table
Parameters / Return Value
data
Text
JSON data to save
EOSEEDQstnVersions
Record "EOS054 Questionnaire Version"
Questionnaire version record
BuildAnswersJSON
procedure BuildAnswersJSON(var data: Text; EOSEEDQstnVersions: Record "EOS054 Questionnaire Version")
This procedure builds the answers JSON from the questionnaire lines in order to be loaded in SurveyJS
Parameters / Return Value
data
Text
the data to pass to SurveyJS
EOSEEDQstnVersions
Record "EOS054 Questionnaire Version"
the questionnaire version record
PrepareChoicesArray
procedure PrepareChoicesArray(var answers: Record "EOS054 Questionnaire Detail") ChoicesArray: JsonArray
This procedure prepares the JSON array of choices for the question
Parameters / Return Value
answers
Record "EOS054 Questionnaire Detail"
The questionnaire detail record
Returns
JsonArray
The JSON array of choices
prepareSingleQuestion
procedure prepareSingleQuestion(Question: Record "EOS054 Questionnaire Line") QuestionPanelJO: JsonObject
This procedure prepares a single question for the questionnaire and the outer panel structure
Parameters / Return Value
Question
Record "EOS054 Questionnaire Line"
The questionnaire line record
Returns
JsonObject
The JSON object
GetQuestionType
procedure GetQuestionType(QType: Enum "EOS054 Qstn. Detail Type"): Text
This function returns the SurveyJS question type based on the questionnaire detail type
Parameters / Return Value
QType
Enum "EOS054 Qstn. Detail Type"
The questionnaire detail type
Returns
Text
The SurveyJS question type
AddMultiTextProperties
procedure AddMultiTextProperties(EEDQuestnAns: Record "EOS054 Questionnaire Detail"; var SingleQuestionJO: JsonObject)
This procedure prepares the JSON additional parameters for the “multiple text” question type
Parameters / Return Value
EEDQuestnAns
Record "EOS054 Questionnaire Detail"
The questionnaire detail record
SingleQuestionJO
JsonObject
The JSON object
PrepareMultiTextArray
procedure PrepareMultiTextArray(var answers: Record "EOS054 Questionnaire Detail"; var SingleQuestionJO: JsonObject)
This procedure prepares the JSON array of elements for the “multiple text” question type
Parameters / Return Value
answers
Record "EOS054 Questionnaire Detail"
The questionnaire detail record
SingleQuestionJO
JsonObject
The JSON object
AttachmentSectionTextBox
procedure AttachmentSectionTextBox(var EEDQstLine: Record "EOS054 Questionnaire Line"): JsonObject
This procedure prepares the attachment section of the questionnaire
Parameters / Return Value
EEDQstLine
Record "EOS054 Questionnaire Line"
Returns
JsonObject
AttachmentSectionTitle
procedure AttachmentSectionTitle(var EEDQstLine: Record "EOS054 Questionnaire Line"): JsonObject
This procedure prepares the attachment section of the questionnaire
Parameters / Return Value
EEDQstLine
Record "EOS054 Questionnaire Line"
the questionnaire line record
Returns
JsonObject
the JSON object
SaveSingleQuestionData
procedure SaveSingleQuestionData(JOQuestion: JsonObject; EEDQstnVersions: Record "EOS054 Questionnaire Version")
This procedure Saves the single question JSON Data (including cancellation)
Parameters / Return Value
JOQuestion
JsonObject
The JSON object of the answered question
EEDQstnVersions
Record "EOS054 Questionnaire Version"
DeleteSingleQuestionData
procedure DeleteSingleQuestionData(questionName: Text; EEDQstnVersions: Record "EOS054 Questionnaire Version")
This procedure deletes the single question data on a questionnaire line from a given question name
Parameters / Return Value
questionName
Text
The question name
EEDQstnVersions
Record "EOS054 Questionnaire Version"
DeleteDoubleQuotesOnValue
procedure DeleteDoubleQuotesOnValue(value: Text): Text
This function deletes the double quotes on a JSON value
Parameters / Return Value
value
Text
The value to be cleaned
Returns
Text
The cleaned value
isBlank
procedure isBlank(QValue: JsonToken): Boolean
Parameters / Return Value
QValue
JsonToken
Returns
Boolean
AddMatrixStructure
procedure AddMatrixStructure(var EEDQuestnAns: Record "EOS054 Questionnaire Detail"; var SingleQuestionJO: JsonObject; transposeData: Boolean)
Parameters / Return Value
EEDQuestnAns
Record "EOS054 Questionnaire Detail"
SingleQuestionJO
JsonObject
transposeData
Boolean
PrepareColumnsArray
procedure PrepareColumnsArray(var answers: Record "EOS054 Questionnaire Detail") ColumnsArray: JsonArray
Parameters / Return Value
answers
Record "EOS054 Questionnaire Detail"
Returns
JsonArray
PrepareRowsArray
procedure PrepareRowsArray(var answers: Record "EOS054 Questionnaire Detail") RowsArray: JsonArray
Parameters / Return Value
answers
Record "EOS054 Questionnaire Detail"
Returns
JsonArray
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.