Navigation: ABC Library Reference > FormVCRClass > FormVCRClass Properties >====== ViewPosition (store the current record position) ====== | |
ViewPosition | STRING(1024) |
The ViewPosition property stores the unique position of the current record.
Implementation:
Position returns the POSITION of the primary key if there is one; otherwise it returns the file POSITION. See the Language Reference for more information on POSITION.
Example:
FormVCRClass.TakeEvent PROCEDURE
VSP BYTE,AUTO
CODE
SELF.Window.Update()
IF EVENT()=EVENT:Accepted THEN
CASE ACCEPTED()
OF SELF.Window.OkControl
OROF SELF.Window.SaveControl
SELF.ViewPosition=POSITION(SELF.View)
SELF.SaveRequired = True
IF SELF.OnFirstRecord THEN
SELF.MoveDirection = Event:ScrollDown
END
ELSE
IF NOT 0{PROP:AcceptAll} THEN
SELF.TakeAcceptedLocator()
END
END