File_Field_Changed_Value - DataDictionary

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

Type: Property

Access: Write-Only

Data Type: String

Parameters: Integer iFile Integer iField

ParameterDescription
iFileNumber of table in current filelist
iFieldNumber of the column in the table


Syntax
 Property String File_Field_Changed_Value

Write Access: Set File_Field_Changed_Value iFile iField to StringVariable/Value


Description

This message is used to change the current value of a foreign table column and to set the column's File_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 retrieve the value of a foreign table column, use File_Field_Current_Value.

Syntax

Set File_Field_Changed_Value of hoDD File_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 File_Field_Changed_Value of oUser_DD File_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


Note:
This property dos not apply to text and binary columns. See DDOs and Extended Field Support for more information.

See Also

Understanding File Buffers and DDO Field Buffers | Field_Changed_Value