Sep 3, 2003

We need to configure the payroll engine over here in such a way that a specific run result is generated a variable number of times. This is realized by using the Fast Formula feature that the RETURN clause can have a variable number of return values.

First I created a direct element type E0, with one input value loops, to hold the number of times the run result is needed. Then intermediate element types E001, E002 and E003 were created, also with one input value, to store at run time the actual loop number. And finally, the element E1 was created, the one we need a variable number of times.

E0 was linked with E001, E002 and E003, with in between this fast formula:

inputs are loops

v1 = '1'
v2 = '2'
v3 = '3'

if loops = 1
then
(
return v1
)
else if loops = 2
then
(
return v1, v2
)
else if loops = 3
then
(
return v1, v2, v3
)


E001, E002 and E003 were all linked to E1 by an other, single Fast Formula.