Hi! In scheduler pro, how do I calculate a field value based on 2 other fields? Example:
duration
field, foo
field (number), bar
field (number)
foo
is from 0 to 10. bar
is duration
x foo
. How do I configure data model?
I tried to specify a getter
get bar() {
return this.foo != null && this.duration != null ? this.foo * this.duration : null
}
But that doesn't reactive. When I update foo
, the bar
is not updated.
convert
function on a field doesn't have access to other fields in the record...
Is there a simple way to achieve it?
I also tried to use setters for duration
and foo
but got some TS errors
'duration' is defined as a property in class 'EventModel', but is overridden here in 'SessionModel' as an accessor.
Appreciate your help. Cheers!