|
![]() |
![]() |
version 2003
PA_PreviousRecord (tableNum)
Parameter | Type | Description | |
tableNum | short | → | Table number |
Description
The command
PA_PreviousRecord
moves the current record pointer to the record preceding the current record in the table number
tableNum
. After the 4D plug-in calls
PA_PreviousRecord
it should use
PA_BeforeSelection
to determine if the current record pointer has passed the beginning of the selection for the table passed into
tableNum
.
Before calling
PA_PreviousRecord
the 4D plug-in should indicate if the many-to-one and one-to many relations should be activated by using
PA_UseAutomaticRelations
.
WARNING
This routine does not use the virtual structure.
Example
Rewind the selection
void RewindSelection (short tableNum)
{
// we do not want to activate the relations
PA_AutomaticRelation(0, 0);
while(!PA_BeforeSelection(tableNum))
{
PA_Yield(); // Give time to other tasks
/*
Do something with the record (PA_SaveRecord can be called here).
*/
// Time to go to the previous record
PA_PreviousRecord(tableNum);
}
}
See Also
PA_BeforeSelection , PA_FirstRecord , PA_NextRecord , PA_UseAutomaticRelations .
Error Handling
Use
PA_GetLastError
to see if an error occurred
Current Selections and Records
The current record is changed to the previous one in the selection, or none if
PA_PreviousRecord
is called for the first record (
PA_BeforeSelection
returns 1).