Salesforce

VarPrev (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

VarPrev (Magic xpa 3.x)

Retrieves the original (previous) value of a variable, based on a dynamic value representing a variable index within the Variable list.

Syntax:

VarPrev(variable)

Parameters:

variable: A value representing a variable index. Should be used with the VAR literal.

Returns:

Original value of requested variable, in the variable's attribute

Examples:

VarPrev('BE'VAR) returns the original value of variable BE

VarPrev('CR'VAR + 7) returns the original value of variable CY

VarPrev('W'VAR) <> W checks if the variable has been changed - similar to VarMod('W'VAR)

Note:

This function should be used to retrieve the value of a variable as it was when the data view record was fetched.

VarPrev should not be used during the initializing stage of a record since Magic xpa does not have the necessary information ready for the function. Therefore you should refrain from using this function in INIT expressions. In any case, during this stage of the engine operation, the previous value of a variable is equal to the current value.

See also:

Var functions

The Online and Rich Client Samples projects (program VA07 and RVA07)

Reference
Attachment 
Attachment