My parameter returns different values depending on IN values, I need to return that value multiplied by constant. How can I implement that in my parameter?

For example if your parameter looks like:

What you need is not a subset for your parameter but simple function, which will be taking value for BCB rider and multiply it by 50%, function example:

def val = hyperon.getNumber('nazwa.parametru', ctx, "selectedRider.riderCode", "BCB")
return 0.5 * val

Remember that function have access to data in two ways:

1. Reading from context

def birthdate = ctx.getDate( 'policy.insured.birthdate' )
// in general getXXX(path) where (path) is correct path in context

2. Arguments

  • Function may take arguments
  • If that is cascade call (by using $f) then all arguments comes as strings
  • If you call function using:…) then arguments are exactly as in the moment of calling, ex:
def flag = '', ctx, arg1, arg2, ... )