#GETVALUE
Returns the last non-zero value in b when a in not specified. If a is a scalar, then #GETVALUE returns the value in array b associated with the scalar date in a. If a is an array, a and b must have the same number of values, and #GETVALUE returns the value in b in the same position as the last non-zero value in a; otherwise, a scalar zero is returned.
#GETVALUE is available in data default expressions, salary and service transformation expressions, Benefit Definitions, Accrual Definitions, and SubFormulas.
Syntax:
a #GETVALUE b
Where:
a is optional but, if specified, can be one of the item types in the list below, depending on the type of expression being evaluated (e.g., fields are not available directly in Benefit Definitions and benefit components are not available in data defaults or transformation expressions). When a is not provided, the last non-zero value in b is returned. Note that calculation dates are not available in Data Defaults because they are not defined until after Data Defaults have been applied.
- a scalar date (e.g., 12/31/2010)
- a single number (e.g., 32000, which is interpreted as the days since 1/1/1900, or 8/13/1987)
- a scalar or array data field (where fields are directly available to expressions)
- a scalar created by assignment
- an array created by assignment (not allowed in a Data Default)
- an expression (e.g., (#ENDMTH DOH) #GETVALUE SALARY)
- a benefit formula component (where benefit components are available to expressions)
b can be one of the following, depending on the type of expression being evaluated (e.g., fields are not available directly in Benefit Definitions and benefit components are not available to data defaults or transformation expressions):
When:
a is not provided, the last non-zero value in b is returned; otherwise a scalar zero is returned
a is a scalar, the value of b associated with date a is returned; zero is returned if a is not a calculation date or not a stop date in start/stop array field b, or if a is earlier than the first effective date in effective date array field b
a is an array, the position of the last non-zero value in a is used to choose the value from b (e.g., if the last 2 values in a are zero and the third to last value is non-zero, then the third to last value in b is returned, even if that value in b is zero)
a is an array data field in a Data Default, the last value in the array is used as a scalar date
a is an array data field in a Service or Salary transformation expression, a is projected and turned into a calculation date number of values, and the calculation date associated with the last non-zero projected value is used to choose the value from b.
b is a data field:
if a is equal to a stop date in the start/stop array field b, the value at that stop date will be returned; otherwise zero is returned
if a is within the range of an effective date in the effective date array field b, the value at that date will be returned; otherwise zero is returned
b is created by assignment, #DATE, #THIS, or a component:
in a Data Default, a must have the same number of values as b, the value in b in the same position as the last non-zero value in a; otherwise, a scalar zero is returned.
for other expressions, when the date defined by a is a calculation date, the value of b for that calculation date is returned; otherwise zero is returned.
Additional topics: