Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: LifHkrI'm still new to Lavastorm so I do not know the correct syntax. I'm trying to compare 2 values and emit the lower value as a "Penalty Amount"
I'm trying to say that if the 'Invoiced Amount' is greater than b then use the b else use the 'Invoiced Amount'
a = count() Is a count of the records
b = (a*'Days to Complete'*25).ifNull(0).double() Multiplies number of records by days and by 25
if 'Invoiced Amount' > b then
emit b.ifNull(0).double() as "Penalty Amount"
else emit 'Invoiced Amount' as "Penalty Amount"