Parameter | Description |
---|---|
iFile | Number of table in current filelist |
iField | Number of column iField in the table |
Procedure File_Field_Default_AutoFind integer iFile integer iField
Call: | Send File_Field_Default_AutoFind iFile iField |
File_Field_Default_AutoFind performs an AutoFind on a foreign table column in "default" mode. This is similar to the File_Field_Autofind method except that it does not set the DataDictionary object's (DDO's) Changed_State to True.
When a normal AutoFind is performed on a parent table (e.g. a Customer table for an Order), the main DDO's Changed_State is set to True because a new parent has been changed. A "default" AutoFind does not set this Changed_State, which avoids the generation of a data-loss warning.
This method should be used to perform an AutoFind as part of setting defaults, to default parent table records. It will often be used inside of a DDO's Clear and Clear_All method and will be used in conjunction with retained column values.
Send File_Field_Default_AutoFind of hDD iFile iField Send File_Field_Default_AutoFind of hDD File_Field FileName.FieldName
Adding the following code to the order view in the OrderHea DDO will cause the customer key column to be retained and auto-found.
Set File_Field_Option File_Field Customer.Customer_Number to DD_Retain // augment clear so that it performs an autofind for the customer. The // retained data will be used to perform this autofind Procedure Clear Forward Send Clear Send File_Field_Default_AutoFind File_Field Customer.Customer_Number End_Procedure
Changing Field Properties within a DD Object | Retains with Parent Fields