Request_Assign - BaseData_Set

Causes the Refresh message to be sent to all data entry objects for this object and its client and server DataDictionary objects as appropriate

Type: Procedure

Parameters: Integer iFile

ParameterDescription
iFileNumber of the table in the current filelist (optional, if zero or nothing is passed, the Main_File of the DDO is used)


Syntax
Procedure Request_Assign Integer iFile

Call: Send Request_Assign iFile


Description

If you find a record manually (with the Find command) and want to have the DDO "latch onto" and display the current record, you can send the Request_Assign message. Request_Assign will cause the DDO and its parent DDOs to accept the record(s) in the buffer as their current record and refresh all affected DEOs.

Request_Assign should be used with caution. The DDO does not check to see if the records it is accepting are truly related. Because this is a manual process, it makes it your responsibility to make sure that the records in the buffer are reasonable. Before sending Request_Assign, you should make sure that all records in the buffers are proper.

Clear Customer
Move iNum to Customer.Customer_Number
Find EQ Customer by 1
Relate Customer
Send Request_Assign of oCustomer_DD


Often you can use Request_Assign and FindByRowId interchangeably. The following two samples would yield the same result.

Sample

This sample calls the FindByRowId global function.

Procedure RefindMyFile RowId riRec
    Boolean bOk

    Move (FindByRowId(MyFile.File_Number,riRec)) to bOk
    Relate MyFile
    Send Request_Assign of oMyFile_DD
End_Procedure

or

Sample

This sample calls the FindByRowId (BaseData_Set class) method.

Procedure RefindMyFile RowId riRec
    Send FindByRowId of oMyFile_DD MyFile.File_Number riRec
End_Procedure



The Request_Assign procedure causes the Refresh message to be sent to all data entry objects (DEOs) for this object and its client and server DataDictionary objects (DDOs) as appropriate. This is to ensure that all data entry objects (DEOs) properly display the record for the current record buffer.

If the current record does not satisfy the constraints, no action occurs (except setting the Found indicator). This procedure sets the Found indicator to True if the record satisfies the constraints; False otherwise.

Request_Assign is not re-entrant. Once a major Data-Dictionary operation (save, find, delete, clear) has begun you cannot start another major operation. The reentrancy restriction applies within DDO structures and across DDO structures.

See Also

Find and Clear Operations in DDOs