Home > Expression Operators > Array Operators > #GETVALUE > #GETVALUE Examples

#GETVALUE Examples

Example 1:
#GETVALUE Hours ; Will return the last non-zero value
; in the array Hours.

Example 2:
r:= date_of_transfer & ; Will return the value of compensation at date of
r #GETVALUE compensation ; transfer, if a value exists in the array whose 
; stop date is the date of transfer.

Example 3:
12/31/2009 #GETVALUE Hours ; Will return zero or the Hours value at
; the stop date 12/31/2009

Example 4:
DT:= #ENDMTH #DODEC &  ; end of the month containing decrement
S:= SALARY &  ; The start/stop array SALARY, is expanded to #DATE
 ; number of values (projecting the value(s) in the
 ; last measurement period, if appropriate; never
 ; includes salary scale or merit
DT #GETVALUE S  ; salary at the end of the month of decrement

Example 5:
12/31/2009 #GETVALUE #THIS  ; Will return the value at 12/31/2009 of #THIS.

Example 6:
r:= (#THIS >= 100000) &

r #GETVALUE #DATE
 ; r indicates where the amounts are greater
 ; than or equal to 100,000 in #THIS.
 ; The last non-zero indicator in r is used
 ; to find the date associated with the
 ; latest value of amounts >= 100,000.

Example 7:  Please see the FAQ "Converting a final pay plan into a cash balance plan" for an example of using #GETVALUE in a subformula.