Codeunit 18122315 EOS Report Parameter Helper

Codeunit 18122315 EOS Report Parameter Helper

Helper functions for reading, handling and dealing with report parameter XML.

Methods

Decode

procedure Decode(XmlParameterSet: Text)

Decodes a report parameter XML into this instance and extracts all fields and its values.

Parameters / Return Value

  • XmlParameterSet Text

    The report parameter XML.


Encode

procedure Encode(): Text

Creates a report parameter XML from the fields and values of this instance.

Parameters / Return Value

  • Returns Text

    The report parameter XML.


Encode

procedure Encode(NewReportId: Integer): Text

Creates a report parameter XML from the fields and values of this instance, for a specific report.

Parameters / Return Value

  • NewReportId Integer

    The ID of the report this report parameter XML is for.

  • Returns Text

    The report parameter XML.


ReportId

procedure ReportId(): Integer

Returns the report ID from the decoded report parameter XML.

Parameters / Return Value

  • Returns Integer

    The report ID.


Get

procedure Get(Name: Text; MustExist: Boolean): Text

Returns the value of field from the decoded report parameter XML.

Parameters / Return Value

  • Name Text

    The name of the field to return.

  • MustExist Boolean

    Specifies if the field must exist. A runtime error is generated if it does not and this is true.

  • Returns Text

    The value of the field as an XML-formatted string.


GetBool

procedure GetBool(Name: Text; MustExist: Boolean): Boolean

Returns the value as Boolean of field from the decoded report parameter XML.

Parameters / Return Value

  • Name Text

    The name of the field to return.

  • MustExist Boolean

    Specifies if the field must exist. A runtime error is generated if it does not and this is true.

  • Returns Boolean

    The value of the field as a Boolean.


GetInt

procedure GetInt(Name: Text; MustExist: Boolean): Integer

Returns the value as Integer of field from the decoded report parameter XML.

Parameters / Return Value

  • Name Text

    The name of the field to return.

  • MustExist Boolean

    Specifies if the field must exist. A runtime error is generated if it does not and this is true.

  • Returns Integer

    The value of the field as an Integer.


GetDate

procedure GetDate(Name: Text; MustExist: Boolean): Date

Returns the value as Date of field from the decoded report parameter XML.

Parameters / Return Value

  • Name Text

    The name of the field to return.

  • MustExist Boolean

    Specifies if the field must exist. A runtime error is generated if it does not and this is true.

  • Returns Date

    The value of the field as an Date.


GetKeys

procedure GetKeys(var result: List of [Text])

Returns a list of all fields that were present on the decoded report parameter XML.

Parameters / Return Value

  • result List[Text]

    A list of text that will contain all field names.


Set

procedure Set(Name: Text; Value: Variant)

Sets the value of a field. If the field does not exist, it is created.

Parameters / Return Value

  • Name Text

    The name of the field. Be aware that this must be a valid XML name.

  • Value Variant

    The value of the field.


Contains

procedure Contains(Name: Text): Boolean

Checks if a given field name exists.

Parameters / Return Value

  • Name Text

    The name of the field. Be aware that this must be a valid XML name.

  • Returns Boolean

    true if the field exists, false otherwise.


Test

procedure Test(Name: Text)

Checks if a given field name exists. A runtime error is generated if it does not.

Parameters / Return Value

  • Name Text

    The name of the field. Be aware that this must be a valid XML name.



EOS Labs -