The current value of a buffer-field object. If you modify the BUFFER-VALUE(), the AVM sets the buffer-field object to the new value.

Data type: The data type of the corresponding buffer-field

Access: Readable/Writeable

Applies to: Buffer-field object handle

Syntax

BUFFER-VALUE [ ( [ i ] ) ]
i
An integer expression representing a subscript, for fields that are arrays.
Note: The parentheses after the method name are only required for array fields. For non-array fields, you can omit the parentheses. In this case, the syntax resembles an attribute and is more readable.

The syntax for reading and writing the value of a buffer-field object using a dynamic reference to a table field in a dynamic ProDataSet, temp-table, query, or buffer object can be awkward, especially when you know the table and field names at compile time. ABL provides a simpler way to express the same syntax, only in a short-hand form using a double colon (::). Both the long- and short-hand forms are shown in the following examples.

Examples

The following code shows the syntax for reading the CustNum buffer field in the Customer table through a ProDataSet handle:
/* Long-hand syntax */
hDSet:GET-BUFFER-HANDLE("ttcust"):BUFFER-FIELD("CustNum"):BUFFER-VALUE( )

/* Short-hand syntax */
hDSet::ttcust::CustNum
The following code shows the syntax for writing a value to the State buffer field in the ttcust temp-table through a ProDataSet handle:
/* Long-hand syntax */
hDSet:GET-BUFFER-HANDLE("ttcust"):BUFFER-FIELD("State"):BUFFER-VALUE = "MA".

/* Short-hand syntax */
hDSet::ttcust::State = "MA".
The following code shows the syntax for reading the first element of the Month-Quota array buffer field in the ttsalesrep temp-table through a ProDataSet handle:
/* Long-hand syntax */
hDSet:GET-BUFFER-HANDLE("ttsalesrep"):BUFFER-FIELD("Month-Quota"):BUFFER-VALUE(1).

/* Short-hand syntax */
hDSet::ttsalesrep::Month-Quota(1)
The following code shows the syntax for writing the first element of the Month-Quota array buffer field in the ttsalesrep temp-table through a ProDataSet handle:
/* Long-hand syntax */
hDSet:GET-BUFFER-HANDLE("ttsalesrep"):BUFFER-FIELD("Month-Quota"):BUFFER-VALUE(1) = 100.

/* Short-hand syntax */
hDSet::ttsalesrep::Month-Quota(1) = 100.
Note: Progress Software Corporation recommends that you do not set the call object's CALL-TYPE attribute to SET-ATTR-CALL-TYPE to set a Buffer-field object's BUFFER-VALUE() method return value, since there in no way to run triggers for the target field.

See also

LITERAL-QUESTION attribute