Table of Contents

KVSKBAExtendedNameValueBuffer

Fields

Name Type Note
Entry No. Integer
Context 1 Code[50]
Context 2 Code[50]
Context 3 Code[50]
Name Text[250]
Value Text Text[250]
Value Text Blob Blob
Value Integer Integer
Value Decimal Decimal
Value Boolean Boolean
Value Date Date
Value Time Time
Value DateTime DateTime
Value Code Code[250]
Value Dateformula DateFormula
Value Record ID RecordId
Value Option Integer
Value Data Type Option OptionMembers: ,Text,Integer,Decimal,Boolean,Date,Time,DateTime,Code,DateFormula,Blob,RecordID,Option
Display Value Text[250]

Procedures

AddValue(Text[250], Variant) : Integer

Summary: Adds a value to the extended name-value buffer.

procedure AddValue(NamePar: Text[250]; ValuePar: Variant): Integer

Parameters:

  • NamePar: The name of the value to add.
  • ValuePar: The value to add.

Returns: The entry number of the added value.

Example: var buffer: Record "Extended Name-Value Buffer"; begin buffer.SetGlobalContext('Codeunit X', 'Function Y', 'Process Z'); buffer.AddValue('Foo1', 'Val1'); buffer.AddValue('Foo2', 'Val2'); end;

Remarks: Use this procedure to add a value to the extended name-value buffer. The value can be of various data types, including Boolean, Date, Time, DateTime, Code, DateFormula, Decimal, Integer, RecordID, Text, and Option. The procedure automatically handles the insertion and context management.

SetGlobalContext(Code[50], Code[50], Code[50]) :

Summary: Sets the global context for subsequent operations.

procedure SetGlobalContext(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]): 

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.

Remarks: Use this procedure to set a global context that will be applied to subsequent AddValue or SetValue operations. This allows for easier management of context-specific data without needing to specify the context for each individual operation.

SetValue(Text[250], Variant) :

Summary: Sets a value in the extended name-value buffer.

procedure SetValue(NamePar: Text[250]; ValuePar: Variant): 

Parameters:

  • NamePar: The name of the value to set.
  • ValuePar: The value to set.

Remarks: Use this procedure to set a value in the extended name-value buffer. The value can be of various data types, including Boolean, Date, Time, DateTime, Code, DateFormula, Decimal, Integer, RecordID, Text, and Option. The procedure automatically handles the insertion and context management.

TryGetValue(Text[250], Variant) : Boolean

Summary: Tries to get a value from the extended name-value buffer.

[TryFunction()]
procedure TryGetValue(NamePar: Text[250]; var ValuePar: Variant): Boolean

Parameters:

  • NamePar: The name of the value to get.
  • ValuePar: The variable to store the retrieved value.

Remarks: Use this procedure to attempt to retrieve a value from the extended name-value buffer. If the value exists, it will be stored in ValuePar; otherwise, ValuePar will remain unchanged.

GetValue(Text[250], Variant) :

Summary: Gets a value from the extended name-value buffer.

procedure GetValue(NamePar: Text[250]; var ValuePar: Variant): 

Parameters:

  • NamePar: The name of the value to get.
  • ValuePar: The variable to store the retrieved value.

Example: var buffer: Record "Extended Name-Value Buffer"; myValue: Variant; begin buffer.SetGlobalContext('Codeunit X', 'Function Y', 'Process Z'); buffer.GetValue('Foo1', myValue); end; In this example, the procedure retrieves the value associated with 'Foo1' in the specified context and stores it in the variable myValue. If 'Foo1' does not exist in the buffer for that context, an error will be raised.

Remarks: Use this procedure to retrieve a value from the extended name-value buffer. The value will be stored in ValuePar. If the value does not exist, an error will be raised.

GetValueAsBoolean(Text[250]) : Boolean

Summary: Gets a boolean value from the extended name-value buffer.

procedure GetValueAsBoolean(NamePar: Text[250]): Boolean

Parameters:

  • NamePar: The name of the value to get.

Returns: The boolean value associated with the specified name.

Remarks: Use this procedure to retrieve a boolean value from the extended name-value buffer. If the value does not exist or is not of type Boolean, an error will be raised.

GetValueAsDate(Text[250]) : Date

Summary: Gets a date value from the extended name-value buffer.

procedure GetValueAsDate(NamePar: Text[250]): Date

Parameters:

  • NamePar: The name of the value to get.

Returns: The date value associated with the specified name.

Remarks: Use this procedure to retrieve a date value from the extended name-value buffer. If the value does not exist or is not of type Date, an error will be raised.

GetValueAsTime(Text[250]) : Time

Summary: Gets a time value from the extended name-value buffer.

procedure GetValueAsTime(NamePar: Text[250]): Time

Parameters:

  • NamePar: The name of the value to get.

Returns: The time value associated with the specified name.

Remarks: Use this procedure to retrieve a time value from the extended name-value buffer. If the value does not exist or is not of type Time, an error will be raised.

GetValueAsDateTime(Text[250]) : DateTime

Summary: Gets a date and time value from the extended name-value buffer.

procedure GetValueAsDateTime(NamePar: Text[250]): DateTime

Parameters:

  • NamePar: The name of the value to get.

Returns: The date and time value associated with the specified name.

Remarks: Use this procedure to retrieve a date and time value from the extended name-value buffer. If the value does not exist or is not of type DateTime, an error will be raised.

GetValueAsInteger(Text[250]) : Integer

Summary: Gets an integer value from the extended name-value buffer.

procedure GetValueAsInteger(NamePar: Text[250]): Integer

Parameters:

  • NamePar: The name of the value to get.

Returns: The integer value associated with the specified name.

Remarks: Use this procedure to retrieve an integer value from the extended name-value buffer. If the value does not exist or is not of type Integer, an error will be raised.

GetValueAsCode(Text[250]) : Code[250]

Summary: Gets a code value from the extended name-value buffer.

procedure GetValueAsCode(NamePar: Text[250]): Code[250]

Parameters:

  • NamePar: The name of the value to get.

Returns: The code value associated with the specified name.

Remarks: Use this procedure to retrieve a code value from the extended name-value buffer. If the value does not exist or is not of type Code, an error will be raised.

GetValueAsDecimal(Text[250]) : Decimal

Summary: Gets a decimal value from the extended name-value buffer.

procedure GetValueAsDecimal(NamePar: Text[250]): Decimal

Parameters:

  • NamePar: The name of the value to get.

Returns: The decimal value associated with the specified name.

Remarks: Use this procedure to retrieve a decimal value from the extended name-value buffer. If the value does not exist or is not of type Decimal, an error will be raised.

GetValueAsDateFormula(Text[250], DateFormula) : Decimal

Summary: Gets a date formula value from the extended name-value buffer.

procedure GetValueAsDateFormula(NamePar: Text[250]; var DateFormulaPar: DateFormula): Decimal

Parameters:

  • NamePar: The name of the value to get.
  • DateFormulaPar: The date formula value associated with the specified name.

Returns: The date formula value associated with the specified name.

Remarks: Use this procedure to retrieve a date formula value from the extended name-value buffer. If the value does not exist or is not of type DateFormula, an error will be raised.

GetValueAsRecordID(Text[250], RecordId) : Decimal

Summary: Gets a record ID value from the extended name-value buffer.

procedure GetValueAsRecordID(NamePar: Text[250]; var RecordIdPar: RecordId): Decimal

Parameters:

  • NamePar: The name of the value to get.
  • RecordIdPar: The record ID value associated with the specified name.

Returns: The record ID value associated with the specified name.

Remarks: Use this procedure to retrieve a record ID value from the extended name-value buffer. If the value does not exist or is not of type RecordId, an error will be raised.

GetValueAsText(Text[250]) : Text

Summary: Gets a text value from the extended name-value buffer.

procedure GetValueAsText(NamePar: Text[250]): Text

Parameters:

  • NamePar: The name of the value to get.

Returns: The text value associated with the specified name.

Remarks: Use this procedure to retrieve a text value from the extended name-value buffer. If the value does not exist or is not of type Text, an error will be raised.

GetValueAsOption(Text[250]) : Integer

Summary: Gets an option value from the extended name-value buffer.

procedure GetValueAsOption(NamePar: Text[250]): Integer

Parameters:

  • NamePar: The name of the value to get.

Returns: The option value associated with the specified name.

Remarks: Use this procedure to retrieve an option value from the extended name-value buffer. If the value does not exist or is not of type Option, an error will be raised.

AddContextAndValue(Code[50], Code[50], Code[50], Text[250], Variant) : Integer

Summary: Adds a value to the extended name-value buffer with specified context.

procedure AddContextAndValue(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]; ValuePar: Variant): Integer

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to add.
  • ValuePar: The value to add.

Returns: The entry number of the added value.

Remarks: Use this procedure to add a value to the extended name-value buffer with specified context.

SetContextAndValue(Code[50], Code[50], Code[50], Text[250], Variant) :

Summary: Sets a value in the extended name-value buffer with specified context.

procedure SetContextAndValue(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]; ValuePar: Variant): 

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to set.
  • ValuePar: The value to set.

Remarks: Use this procedure to set a value in the extended name-value buffer with specified context.

GetContextValue(Code[50], Code[50], Code[50], Text[250], Variant) :

Summary: Gets a value from the extended name-value buffer with specified context.

procedure GetContextValue(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]; var ValuePar: Variant): 

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.
  • ValuePar: The variable to store the retrieved value.

Remarks: Use this procedure to retrieve a value from the extended name-value buffer with specified context. The value will be stored in ValuePar. If the value does not exist, an error will be raised.

GetContextValueAsBoolean(Code[50], Code[50], Code[50], Text[250]) : Boolean

Summary: Gets a boolean value from the extended name-value buffer with specified context.

procedure GetContextValueAsBoolean(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Boolean

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The boolean value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Boolean, an error will be raised.

GetContextValueAsDate(Code[50], Code[50], Code[50], Text[250]) : Date

Summary: Gets a date value from the extended name-value buffer with specified context.

procedure GetContextValueAsDate(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Date

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The date value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Date, an error will be raised.

GetContextValueAsTime(Code[50], Code[50], Code[50], Text[250]) : Time

Summary: Gets a time value from the extended name-value buffer with specified context.

procedure GetContextValueAsTime(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Time

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The time value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Time, an error will be raised.

GetContextValueAsDateTime(Code[50], Code[50], Code[50], Text[250]) : DateTime

Summary: Gets a date and time value from the extended name-value buffer with specified context.

procedure GetContextValueAsDateTime(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): DateTime

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The date and time value associated with the specified name and context.

Remarks: If the value does not exist or is not of type DateTime, an error will be raised.

GetContextValueAsInteger(Code[50], Code[50], Code[50], Text[250]) : Integer

Summary: Gets an integer value from the extended name-value buffer with specified context.

procedure GetContextValueAsInteger(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Integer

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The integer value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Integer, an error will be raised.

GetContextValueAsCode(Code[50], Code[50], Code[50], Text[250]) : Code[250]

Summary: Gets a code value from the extended name-value buffer with specified context.

procedure GetContextValueAsCode(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Code[250]

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The code value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Code, an error will be raised.

GetContextValueAsDecimal(Code[50], Code[50], Code[50], Text[250]) : Decimal

Summary: Gets a decimal value from the extended name-value buffer with specified context.

procedure GetContextValueAsDecimal(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Decimal

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The decimal value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Decimal, an error will be raised.

GetContextValueAsDateFormula(Code[50], Code[50], Code[50], Text[250], DateFormula) :

Summary: Gets a date formula value from the extended name-value buffer with specified context.

procedure GetContextValueAsDateFormula(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]; var DateFormulaPar: DateFormula): 

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.
  • DateFormulaPar: The variable to store the retrieved date formula value.

Remarks: If the value does not exist or is not of type DateFormula, an error will be raised.

GetContextValueAsRecordID(Code[50], Code[50], Code[50], Text[250], RecordId) : Decimal

Summary: Gets a record ID value from the extended name-value buffer with specified context.

procedure GetContextValueAsRecordID(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]; var RecordIdPar: RecordId): Decimal

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.
  • RecordIdPar: The variable to store the retrieved record ID value.

Returns: The record ID value associated with the specified name and context.

Remarks: If the value does not exist or is not of type RecordId, an error will be raised.

GetContextValueAsText(Code[50], Code[50], Code[50], Text[250]) : Text

Summary: Gets a text value from the extended name-value buffer with specified context.

procedure GetContextValueAsText(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Text

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The text value associated with the specified name and context.

Remarks: If the value does not exist or is not of type Text, an error will be raised.

GetContextValueAsOption(Code[50], Code[50], Code[50], Text[250]) : Integer

Summary: Gets an option value from the extended name-value buffer with specified context.

procedure GetContextValueAsOption(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Integer

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to get.

Returns: The option value as integer associated with the specified name and context.

Remarks: If the value does not exist or is not of type Option, an error will be raised.

Exists(Code[50], Code[50], Code[50], Text[250]) : Boolean

Summary: Checks whether an entry with the specified context and name exists in the extended name-value buffer.

procedure Exists(Context1Par: Code[50]; Context2Par: Code[50]; Context3Par: Code[50]; NamePar: Text[250]): Boolean

Parameters:

  • Context1Par: The first context parameter.
  • Context2Par: The second context parameter.
  • Context3Par: The third context parameter.
  • NamePar: The name of the value to check.

Returns: True if a matching entry exists; otherwise false.

Remarks: The check is performed on a shared copy of the buffer, so the current filters on the record are not affected.

IsDataTypeSupported(Variant) : Boolean

Summary: Checks whether the data type of the given variant is supported by this buffer.

procedure IsDataTypeSupported(ValuePar: Variant): Boolean

Parameters:

  • ValuePar: The variant value whose data type is to be checked.

Returns: True if the data type is supported; otherwise false.

Remarks: Supported data types are: Boolean, Date, Time, DateTime, Code, DateFormula, Decimal, Integer, RecordId, Text, and Option.