Declare Expression: Set existing value of the same property.
I have a requirement to calculate a age value by comparing two datetime values. Calculation is done using a declare expression rule and for some scenarios (otherwise path if all the other if conditions are failed - default path) without doing the calculation existing age value need to be display. We can't use same property for "value of" in declare expression since it creates a loop in there.
Is there any mechanism to set the existing value of the same property in declare expressions?
The expression calculate values whenever inputs change.
Suppose a scenario that the input change 1st time and set the age as 20. After some time input change again for the 2nd time but the age value should not calculated again. It should remain as 20 (existing value) and these type of scenarios need to be handle in default (otherwise) path.
a declare expression is available with two input values and declare expression execute whenever input change. In the declare expression there are 3 if conditions
if con 1
then result = calculation a
if con 2
then result = calculation b
if con 3
then result = calculation c
result = 0
When one of the input change declare expression execute and do the relevant calculation and set the value to the property. Again one of the input change and although the property has value declare expression is execute since it trigger whenever input change. At that time all the 3 conditions are getting false and expression execute otherwise path and set 0. Suppose we need to keep existing value of that property, but with otherwise path it's getting set to 0.
So is there any method to prevent this situation?
What happens by the option "value of first matching property in parent pages" only available in otherwise path? Is there any example for that?