PriorValue

Mon 01 January 2018

Syntax

PriorValue(fieldname)

Description

Use the PriorValue function in FieldEdit and FieldChange PeopleCode to obtain the prior value of a buffer field that the user just changed. It returns the value that was in the buffer field before the user changed it, not the value of the field the last time the component was saved.

PriorValue gives correct results only in FieldEdit and FieldChange PeopleCode, and only for the buffer field where the function is executing. If you pass another field name to the function, it returns the current value of the buffer field, not the prior value.

Parameters

Field or Control

Definition

fieldname

The name of the record field. For correct results, this must be the name of the field where the call to PriorValue executes.

Returns

Returns an Any value equal to the value that was in the current buffer field immediately prior to the last edit.