Field_Changed_Value - DataDictionary

Sets the current value of a table column and sets the column's Field_Changed_State to True

Type: Property

Access: Write-Only

Data Type: String

Parameters: Integer iField

ParameterDescription
iFieldNumber of the column in the table


Syntax
 Property String Field_Changed_Value

Write Access: Set Field_Changed_Value iField to StringVariable/Value


Description

This message is used to change the current value of a table column and to set the column's Field_Changed_State to True. This is a commonly used message and is the suggested method for changing DDO column values in preparation for a save.

To use this property with text and binary columns, be sure to set pbBypassDDFieldBuffer of the data entry object (DEO) (e.g. cDbTextEdit) to False. See DDOs and Extended Field Support for more information.

To retrieve the value of a table column, use Field_Current_Value.

Syntax

Set Field_Changed_Value of hoDD Field TableName.ColumnName to NewValue

Sample

Set Field_Changed_Value of hoDD Field Customer.Name to sName

Sample

Function ChangeName RowId riRecId string sName returns Boolean
    Boolean bErr

    Send Clear of oUser_DD
    Send FindByRowId of oUser_DD User.File_Number riRecId
    If (Found) Begin
        // update name and save
        Set Field_Changed_Value of oUser_DD field User.Name to sName
        Get Request_Validate of oUser_DD to bErr
        If (not(bErr)) begin
            Send Request_Save of oUser_DD
            // if save succeeds, Err indicator is False   
            Move (Err) to bErr 
        End
    End
    Else Begin
        Move True to bErr
    End
    Function_Return bErr
End_Function


You will note that many of the samples use the file buffer to directly obtain the value of a column (e.g. Move Customer.Name to sName). This is discussed in detail in Understanding File Buffers and DDO Field Buffers.


File and File_Field Interfaces

Many of the DataDictionary methods contain a two variants of the same message: Field_Message and File_Field_Message. For a complete description of these messages please refer to The Field and File_Field DD Interfaces.

The Field_ version of a message must use the keyword FIELD to identify the file.field name. The File_Field_ version must use the keyword FILE_FIELD to identify the file.field values. These should never be mixed!

// When using Field_ message use the FIELD keyword
Set Field_Changed_Value Field User.Name to sName

// When using the File_Field_ message use the FILE_FIELD keyword
Set File_Field_Changed_Value of oUser_DD File_Field User.Name to sName

See Also

File_Field_Changed_Value