version 1.5
OD Previous in context (context_ID{; index}) Integer
| Parameter | Type | Description | |
| context_ID | Longint | Context identifier | |
| index | Integer | Index array | |
| Function result | Integer | Error code | |
| 1 = the operation is successful | |||
| 0 = the previous row does not exist | |||
| - 1 = an error occured |
Description
The OD Previous in context function loads the result row preceding the current row. If the current row is undefined, as after OD Activate context, OD Previous in context does nothing.
context_ID must be a context identifier that has been previously created and activated.
OD Previous in context updates the 4th Dimension objects associated with the current row. For binds involving fields, the current record is updated but not saved. If a current record does not exist, OD Previous in context ignores the corresponding bind.
index applies only to binds involving arrays. If index is not specified, OD Previous in context updates the lines of the arrays that correspond to the number of the new current row.
If index is specified, OD Previous in context updates the lines of the arrays with the index index. If index is beyond the limits of an array, OD Previous in context adds a new line to it.
OD Previous in context returns 1 if no error occurred, 0 if the previous row does not exist, and -1 if an error occurs.
See Also
OD Activate context, OD Next in context.