Table of Contents

KVSKBALabelLib

Procedures

FormatDateToText(Date, Text[20]) : Text[30]

Summary: Formats a date variable to a string expression in a given expression layout as parameter. The interpretation is based on strings "YYYY" for year, "MM" for month, and "DD" for days.

procedure FormatDateToText(dateValue: Date; expression: Text[20]): Text[30]

Parameters:

  • dateValue: The date value to format.
  • expression: The expression layout to use for formatting.

Returns: A string representation of the formatted date.

Remarks: If the expression is empty, the function returns the default formatted date string.

Events

OnBeforeGetSourceCalculation(Enum KVSKBALIFSourceType, Enum KVSKBALIFSourceSubtype, Integer, Code[20], Text[250], Boolean) :

Summary: Event is raised before getting the source calculation for a label content line.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetSourceCalculation(SourceType: Enum "KVSKBALIFSourceType"; SourceSubtype: Enum "KVSKBALIFSourceSubtype"; SourceFieldNo: Integer; SourceCode: Code[20]; var ResultText: Text[250]; var IsHandled: Boolean): 

Parameters:

  • SourceType: The source type for the label content line.
  • SourceSubtype: The source subtype for the label content line.
  • SourceFieldNo: The source field number for the label content line.
  • SourceCode: The source code for the label content line.
  • ResultText: A text variable that will hold the result of the source calculation.
  • IsHandled: A boolean variable that indicates whether the event has been handled. If set to true, the default behavior will be skipped.

Remarks: This event is raised before getting the source calculation for a label content line. It allows subscribers to handle the process, modify the result text, and indicate if the event has been handled.

OnBeforeGetSourceValue(Record KVSKBALabelContentHeader, Record KVSKBALabelContentLine, Boolean, Text[250], Boolean) :

Summary: Event is raised before getting the source value for a label content line.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetSourceValue(var KVSKBALabelContentHeader: Record "KVSKBALabelContentHeader"; var KVSKBALabelContentLine: Record "KVSKBALabelContentLine"; IsPreview: Boolean; var ResultText: Text[250]; var IsHandled: Boolean): 

Parameters:

  • KVSKBALabelContentHeader: The label content header record.
  • KVSKBALabelContentLine: The label content line record.
  • IsPreview: A boolean variable indicating whether the label is being previewed or printed.
  • ResultText: A text variable that will hold the result of the source value calculation.
  • IsHandled: A boolean variable that indicates whether the event has been handled. If set to true, the default behavior will be skipped.

Remarks: This event is raised before getting the source value for a label content line. It allows subscribers to handle the process, modify the result text, and indicate if the event has been handled.

OnGetTableNoFromSourceTypeOnCaseSourceTypeElse(Enum KVSKBALIFSourceType, Integer, Boolean) :

Summary: Event is raised when the source type is not handled in the GetSourceCalculation function.

[IntegrationEvent(false, false)]
local procedure OnGetTableNoFromSourceTypeOnCaseSourceTypeElse(KVSKBALIFSourceType: Enum "KVSKBALIFSourceType"; var TableNo: Integer; var IsHandled: Boolean): 

Parameters:

  • KVSKBALIFSourceType: The source type that is not handled.
  • TableNo: The table number that will be used for the source calculation.
  • IsHandled: A boolean variable that indicates whether the event has been handled. If set to true, the default behavior will be skipped.

Remarks: This event is raised when the source type is not handled in the GetSourceCalculation function. It allows subscribers to handle the process, modify the table number, and indicate if the event has been handled.

OnGetBarCodeRefOnBeforeFindItemReference(Record Item Reference, Code[20], Option, Code[20], Code[50], Code[50], Date, Code[20], Code[20], Date) :

Summary: Event is raised before finding the item reference for a barcode reference.

[IntegrationEvent(false, false)]
local procedure OnGetBarCodeRefOnBeforeFindItemReference(var ItemReference: Record "Item Reference"; SourceCode: Code[20]; ReturnData: Option; ItemNo: Code[20]; LotNo: Code[50]; SerialNo: Code[50]; ExpirationDate: Date; UOM: Code[20]; VariantCode: Code[20]; PrintDate: Date): 

Parameters:

  • ItemReference: The item reference record that will be used to find the barcode reference.
  • SourceCode: The source code for the barcode reference.
  • ReturnData: The return data type for the barcode reference (Barcode or Plain Text).
  • ItemNo: The item number for the barcode reference.
  • LotNo: The lot number for the barcode reference.
  • SerialNo: The serial number for the barcode reference.
  • ExpirationDate: The expiration date for the barcode reference.
  • UOM: The unit of measure for the barcode reference.
  • VariantCode: The variant code for the barcode reference.
  • PrintDate: The print date for the barcode reference.

Remarks: This event is raised before finding the item reference for a barcode reference. It allows subscribers to handle the process, modify the parameters, and indicate if the event has been handled.