Transformation Expressions
Transformation expressions allow you to examine and modify values within Service or Salary Definitions. Basically the expressions “transform” the values of raw and/or computed array data into essential Measurement Period values by using Data Dictionary fields and ProAdmin's Expression Operators.
When transformation expressions are used, ProAdmin constructs a table, available in the Detailed Results of an Estimated, Final or Dates/Age/Service calculation, to document the computations in the expression. The first two columns of the table are always the values of #DATE and #THIS. Afterward, each variable within the expression is represented by its own column, where each value is the value at the corresponding date in #DATE. The final column of the table contains the result of the expression. Values computed during the execution of transformation expressions can be examined, after a calculation has been run, in the Detailed Results under:
There are two important distinctions:
The results of a salary transformation expression must be cumulative values within each measurement period as related to a year. Monthly results represent 1/12 of a year.
Example of a Service Transformation:
Suppose the company recorded annual hours prior to 2004 incorrectly. They want to grant 1000 hours for years prior to 2004 when the participant worked more than 350 hours, but less than 1000. Otherwise annual hours should be divided by 2000 to determine the amount of service earned in a calendar year. The hours-transformation expression might be:
Code Comments A := (#date < 1/1/2004) & ; 1 if date is before 2004; 0 if date after 2003 B := (#this > 350 ) & ; 1 if hours are over 350; 0 if less C := (#this < 1000 ) & ; 1 if hours are less than 1000; 0 if more D := (A x B x C x 1000) #max #this & ; hours that will be used D/2000 ; annual service
The first two columns in the Transformation Expression table, “Date (#DATE)” and “#THIS,” are provided by ProAdmin using the rules of the Service Definitions. Columns “A,” “B,” “C” and “D” hold the values of the temporary variables. Column “Expression Result” contains the results of the expression and will be inserted as Transformed Hours in the “Expanded Dates” tables of the Service Definition Set.
Date Expression (#DATE) #THIS A B C D Results 12/31/2001 1500 1 1 0 1500 0.75 12/31/2002 300 1 0 1 0 0.15 12/31/2003 400 1 1 1 1000 0.50 12/31/2004 1700 0 1 0 1700 0.85 12/31/2005 2080 0 1 0 1000 1.04 12/31/2006 400 0 1 1 400 0.20 12/31/2007 2080 0 1 0 2080 1.04
Example of a Salary Transformation:
The company includes participants' bonuses in Pensionable Earnings. In 2012, they made a mistake and included participants' bonuses twice. They need to have Pensionable earnings for 2012 be like all the other years. The data includes two fields: Pensionable Earnings and Bonus. The salary transformation expression might be:
The first two columns, “Date (#DATE)” and “#THIS,” are provided by ProAdmin using the rules of the Salary Definition. Columns “A,” “Pay,” and “B” hold the values of the temporary variables. Column “Expression Result” contains the results of the expression and will be inserted as Transformed Salary in the “Expanded Dates” tables of the Salary Definition Set.
Code Comments A:= (#year #date) = 2012 & ; 1 if date is in 2012; 0 if date is not in 2012 Pay:= #this & ; the computed accumulated values of Pensionable Earnings B:= Bonus & ; the annual bonus Pay #zminus (A * B) ; Pay if the year is not 2012, pay - bonus if year is 2012
Date Expression (#DATE) #THIS a Pay Bon Result 12/31/2010 25000 0 25000 1000 25000 12/31/2011 26000 0 26000 1000 26000 12/31/2012 28000 1 28000 1000 27000 12/31/2013 28000 0 28000 1000 28000 12/31/2014 29000 0 29000 1000 29000