Home > Expression Operators > Array Operators > #START #STOP #VALUE

#START #STOP #VALUE

Retrieves elements from each row of an array:

#START retrieves the start date from a start/stop array or the effective date from an effective date array

Syntax: a #START b

where:

a = blank or -99, -98, -97, ...,-1, 0, 1, 2, 3, ..., 99.

b = an array field

When a is:

   blank or 0 The relative start or effective dates remain intact. 
         -1 The elements are shifted down by one row. The start (or effective) dates are from the previous row using 0 for the first row.
         -n The elements are shifted down by n rows. The start (or effective) dates are from the previous nth row using 0 for the n values before first row.
         1 The elements are shifted up by one row. The start (or effective) dates are from the following row using 0 for the last row.
         n The elements are shifted up by n rows. The start (or effective) dates are from the previous nth row using 0 for the n values after the last row.

 

#STOP retrieves stop dates from a start & stop date array field

Syntax: a #STOP b

where:

a = blank or -99, -98, -97, ...,-1, 0, 1, 2, 3, ..., 99.

b = a start & stop date array field

When a is:

         blank or 0 The relative entries remain intact. 
   -1 The elements are shifted down by one row. The stop dates are from the previous row using 0 for the first row.
   -n The elements are shifted down by n rows. The stop dates are from the previous nth row using 0 for the n values before first row.
   1 The elements are shifted up by one row. The stop dates are from the following row using 0 for the last row.
   n The elements are shifted up by n rows. The stop dates are from the previous nth row using 0 for the n values after the last row.

 

#VALUE retrieves the values from array fields

Syntax: a #VALUE b

where:

a = blank or -99, -98, -97, ...,-1, 0, 1, 2, 3, ..., 99.

b = an array field

When a is:

         blank or 0 The relative entries remain intact.
   -1 The elements are shifted down by one row. The values are from the previous row using 0 for the first row.
   -n The elements are shifted down by n rows. The values are from the previous nth row using 0 for the n values before first row.
   1 The elements are shifted up by one row. The values are from the following row using 0 for the last row.
   n The elements are shifted up by n rows. The values are from the previous nth row using 0 for the n values after the last row.

 

Example: Bonuses are paid in February following the calendar year in which they are earned, but are included in pensionable pay during the year in which they are earned. How can ProAdmin handle this? The array Bonus has the following rows:

Start date End date Value
1/1/2011 12/31/2011 $ 0
1/1/2012 12/31/2012 $ 7,000
1/1/2013 12/31/2013 $ 9,000
1/1/2014 12/31/2014 $ 12,000

 

Solution In Data Defaults create a new Start & Stop array: Bonus1 and default the field as follows:

B:= #start Bonus &

E:= #stop Bonus &

V:= 1 #value Bonus &

11 #array (B, E, V)

The array Bonus1 has the following rows:

Start date End date Value
1/1/2011 12/31/2011 $ 7,000
1/1/2012 12/31/2012 $ 9,000
1/1/2013 12/31/2013 $ 12,000
1/1/2014 12/31/2014 $ 0