Codeunit 18060472 EOS054 EED Functions

Codeunit 18060472 EOS054 EED Functions

Methods

CopyQuestionnaire

procedure CopyQuestionnaire(NewID: Code[20]; var fromQuestionnaire: Record "EOS054 Questionnaire Version"; copyOptions: Option All,"All but answers","All but numeric answers","Answers only")

Copy Questionnaire procedure, used in the questionnaire copy page.

Parameters / Return Value

  • NewID Code[20]

  • fromQuestionnaire Record "EOS054 Questionnaire Version"

  • copyOptions Option

    All (0) , "All but answers" (1) , "All but numeric answers" (2) , "Answers only" (3)


CopyAnswers

procedure CopyAnswers(fromQuestionnaire: Record "EOS054 Questionnaire Version";NewID: Code[20]; newVersionNo: Integer; var TempToQuestionnaireAnswers: Record "EOS054 Questionnaire Detail" temporary; OnlyMarked: Boolean)

Parameters / Return Value

  • fromQuestionnaire Record "EOS054 Questionnaire Version"

  • NewID Code[20]

  • newVersionNo Integer

  • TempToQuestionnaireAnswers Record "EOS054 Questionnaire Detail"

  • OnlyMarked Boolean


GetLastAnsweredQuestionNo

procedure GetLastAnsweredQuestionNo(QstnID: Code[20]): Code[20]

Get the last answered question number from a list of questions

Parameters / Return Value

  • QstnID Code[20]

    The questionnaire ID

  • Returns Code[20]

    The last answered question number


CreateNewQuestionnaireVersion

procedure CreateNewQuestionnaireVersion(EEDQuestnH: Record "EOS054 Questionnaire Header") newVersion: Integer

Parameters / Return Value

  • EEDQuestnH Record "EOS054 Questionnaire Header"

  • Returns Integer


GetCurrQuestionnaireVersion

procedure GetCurrQuestionnaireVersion(EEDQuestnH: Record "EOS054 Questionnaire Header") lastVersion: Integer

Parameters / Return Value

  • EEDQuestnH Record "EOS054 Questionnaire Header"

  • Returns Integer


GetLastTimestampOfPackageByFilename

procedure GetLastTimestampOfPackageByFilename(LanguageCode: Code[10]; Filename: Text): DateTime

Get the last timestamp of a package file by filename

Parameters / Return Value

  • LanguageCode Code[10]

  • Filename Text

  • Returns DateTime


SetNewPackageFile

procedure SetNewPackageFile(LanguageCode: Code[10]; Filename: Text[250]; Timestamp: Datetime)

Set a new package file in the database

Parameters / Return Value

  • LanguageCode Code[10]

    The Language Code of the package

  • Filename Text[250]

    The filename of the package

  • Timestamp Datetime

    The timestamp of the package


MakeNewQuestionnaire

procedure MakeNewQuestionnaire(Questionnaire: Record "EOS054 Questionnaire Header")

Make a new questionnaire from the latest template available

Parameters / Return Value

  • Questionnaire Record "EOS054 Questionnaire Header"

GetLatestQuestionnaireVersion

procedure GetLatestQuestionnaireVersion(LanguageCode: Code[10]): Record "EOS054 Qstn. Templ. Hdr"

Get the latest questionnaire template version available for a language

Parameters / Return Value

  • LanguageCode Code[10]

  • Returns Record "EOS054 Qstn. Templ. Hdr"


LoadQuestionsFromTemplate

procedure LoadQuestionsFromTemplate(ToQuestionnaire: Record "EOS054 Questionnaire Header"; FromTemplate: Record "EOS054 Qstn. Templ. Hdr")

Load questions from a template to a questionnaire

Parameters / Return Value

  • ToQuestionnaire Record "EOS054 Questionnaire Header"

  • FromTemplate Record "EOS054 Qstn. Templ. Hdr"


CheckCopy

procedure CheckCopy(var fromQuestionnaire: Record "EOS054 Questionnaire Version"; NewID: Code[20]; copyOptions: Option All,"All but answers","All but numeric answers","Answers only"): Boolean

CheckCopy Checks if the questionnaire can be copied

Parameters / Return Value

  • fromQuestionnaire Record "EOS054 Questionnaire Version"

    the questionnaire source data

  • NewID Code[20]

    the ID of the Target Questionnaire

  • copyOptions Option

    All (0) , "All but answers" (1) , "All but numeric answers" (2) , "Answers only" (3)

    the options selected for the copy

  • Returns Boolean

    boolean


AssertCheckCopy

procedure AssertCheckCopy(var fromQuestionnaire: Record "EOS054 Questionnaire Version"; NewID: Code[20]; copyOptions: Option All,"All but answers","All but numeric answers","Answers only")

Checks if a questionnaire can be copied to a new ID and throws an error if not.

Parameters / Return Value

  • fromQuestionnaire Record "EOS054 Questionnaire Version"

    The source questionnaire to copy from.

  • NewID Code[20]

    The ID of the new questionnaire.

  • copyOptions Option

    All (0) , "All but answers" (1) , "All but numeric answers" (2) , "Answers only" (3)

    The options for copying the questionnaire.


CheckModules

procedure CheckModules(var fromQuestionnaire: Record "EOS054 Questionnaire Header"; var toQuestionnaire: Record "EOS054 Questionnaire Header")

Checks if the source questionnaire has the required modules for the target questionnaire.

Parameters / Return Value

  • fromQuestionnaire Record "EOS054 Questionnaire Header"

  • toQuestionnaire Record "EOS054 Questionnaire Header"


IsModuleEnabledOnQuestionnaire

procedure IsModuleEnabledOnQuestionnaire(Questionnaire: Record "EOS054 Questionnaire Header"; Module: Code[20]): Boolean

Check if a module is enabled on a questionnaire

Parameters / Return Value

  • Questionnaire Record "EOS054 Questionnaire Header"

    The questionnaire record

  • Module Code[20]

    The module code

  • Returns Boolean


GetModuleDescription

procedure GetModuleDescription(Module: Code[10]): Text

Get the description of a module

Parameters / Return Value

  • Module Code[10]

    The module code

  • Returns Text


CalcCompletionPercentage

procedure CalcCompletionPercentage(QCode: Code[20]; VersionNo: Integer): Decimal

Calculate the completion percentage of a questionnaire

Parameters / Return Value

  • QCode Code[20]

  • VersionNo Integer

  • Returns Decimal


SendNotificationOnQuestionnaireCompletion

procedure SendNotificationOnQuestionnaireCompletion(QCode: Code[20]; VersionNo: Integer)

Parameters / Return Value

  • QCode Code[20]

  • VersionNo Integer


PrintQuestionnaireAction

procedure PrintQuestionnaireAction(MyNotification: Notification)

Parameters / Return Value

  • MyNotification Notification

GetLocalizedBoolean

procedure GetLocalizedBoolean(YesNo: Boolean; LanguageCode: Code[10]): Text

Parameters / Return Value

  • YesNo Boolean

  • LanguageCode Code[10]

  • Returns Text


GetVersionDisplayString

procedure GetVersionDisplayString(TemplateHeader: Record "EOS054 Qstn. Templ. Hdr"): Text

Parameters / Return Value

  • TemplateHeader Record "EOS054 Qstn. Templ. Hdr"

  • Returns Text


getTitleText

procedure getTitleText(): Text

Get the title and description of the questionnaire

Parameters / Return Value

  • Returns Text

getDescrText

procedure getDescrText(): Text

Get the description of the questionnaire

Parameters / Return Value

  • Returns Text


EOS Labs -