File_Field_Entry - DataDictionary

Allows you to place data into a DataDictionary field buffer using all the same logic that gets applied to data entry object/keyboard entry

Type: Procedure Set

Data Type: String

Parameters: integer iFile integer iField integer bShowErr string sValue

ParameterDescription
iFileNumber of the table in the current filelist
iFieldNumber of the field in the table
bShowErrDetermines whether error will be displayed
sValueEntry value of the table field


Syntax
Procedure Set File_Field_Entry integer iFile integer iField integer bShowErr string sValue


Description

The File_Field_Entry procedure allows you to place data into a DataDictionary field buffer using all the same logic that gets applied to data entry object (DEO)/keyboard entry. It applies the following rules:


The following exceptions are applied here:

1. If the field is a ForcePut field the field is always updated.
2. If the field is NoPut and the field is changed it will be updated (needed for finding) but the Field_Changed_State will not be set (since it does not indicate a changed condition).

Foreign field values are properly applied. If the data value passed is not valid for the field's data type the data will not be entered. An example of an invalid data would be attempting to enter the string "test" into a date or numeric field. When the data is invalid, the bShowErr parameter determines if the error should reported (i.e., if an error should be generated). Normally you will want this to be True.

This message can be used for all data types. If you use this to set a text (or binary) field, the passed string will be converted to a pointer and the message will be directed to the private Field_Pointer_Entry method. If your DataDictionary object (DDO) does not support an extended field for the passed field an error will be declared.

This can be a useful message. While it is similar to File_Field_Current_Value (and Field_Current_Value), it is a more active message. It allows you to enter data in a DD field buffer in a manner similar to keyboard entry. This can be useful in batch processes.

Sample

Set File_Field_Entry of oCustomer_DD Customer.File_Number 5 True To "Last Name"


Of Note

You should use this message and not the private Field_Entry message. The File_Field_Entry message will figure out the foreign field state of your DD and apply the appropriate field options. Also, you must be careful about which DD receives this message. If a DD is being used as a parent field (e.g., the customer DD in an order entry application), this message should be sent to the main-DD and not parent DD (e.g., send message to the order DD, not the customer DD). If you do not send this to the proper DDO, you will not get the proper application of foreign field options.

This message does not perform a field validation on the field. Normally, during a batch entry process the field validation will be performed after all fields are updated by sending the message get Request_Validate or get Request_Validate_All.