HI all
I have a record for sum insured values let's say he below:
id: Primary Key (QuoteID)
riskType1SumInsured: Aggregate field of all RiskType1 sum insureds
riskType2SumInsured: Aggregate field of all RiskType2 sum insureds
riskType3SumInsured: Aggregate field of all RiskType3 sum insureds
totalSumInsured: a!customFieldSum(riskType1SumInsured, riskType2SumInsured,riskType3SumInsured )
When all the risk type 1,2 and 3 sum insured values have a value (Not Null) the totalSumInsured works correctly, however as soon as one or many of the risk type 1,2 and 3 sum insured values are null, the totalSumInsured simply returns a null.
I have tried wrapping the risk type 1,2 and 3 sum insured values in the a!customFieldSum(), with a!defaultValue() as well is a!isnullOrEmpty(), but no change in behaviour.
Is there something i am missing?
Discussion posts and replies are publicly visible
Have you tried this
totalSumInsured: a!customFieldSum( a!customFieldDefaultValue(riskType1SumInsured, 0), a!customFieldDefaultValue(riskType2SumInsured, 0), a!customFieldDefaultValue(riskType3SumInsured, 0) )
Thanks Shubham - this has resolved the issue. Sometimes when you've stared at these things for too long you cannot see the wood for the trees. Thank you for the assistance
I completely understand, I've been there too!