Skip to main content

 

Planview Customer Success Center

GetPreviousValue Function

GetPreviousValue (field as Object) as Object

Category: Common
Description: Returns the pervious value of a given field prior to last change
Supported Context: BusinessRules
Parameters:  
field as Object Represents the field of a specific object for which you would like to see the previous value
Returned value as Object Returns the previous value of the field given in the "field" parameter prior to the last change
Example #1

Set a workflow rule that sends an email automatically to the work item's manager whenever the work item's percent completion increases by more than 25% (for example: an update from 20% to 50% would trigger the workflow, while an increase from 20% to 25% will not).

$PercentCompleted - GetPreviousValue($PercentCompleted) >= 25

Example #2

Define a validation rule for a bug that will prevent clearing the 'To be resolved' field (if it was previously defined) and the bug is marked as 'reported by customer'. The Evaluation Criteria of the validation rule to:

isNull($PlannedFor) && Not(IsNull(GetPreviousValue($PlannedFor))) && $ReportedbyCustomer

Tips The GetPreviousValue() function cannot be used within formulas for Rescheduling actions, since the rescheduling is a queued job that happens after the object is already updated
Note This function is only available for business rules
Additional Links

Business Rules