Hi,
I have 5 fields on a form. Field1, Field2, Field3, Field4, SumField
SumField is disabled as it is calculated field based on other four fields.
SumField = Field1 + Field2 + Field3 + Field4
It should only sum the values if they are not null. If one of the fields is null it should skip that field.
Also, null field should stay null, the code must not convert it to zero.
Example:
Field1 = 5
Field2 = null
Field3 = null
Field4 = 10
SumField = 15
I know I can do it with IF code for each field, but there is a lot of this fields and it would complicate whole thing.
Any help appreciated.
I have 5 fields on a form. Field1, Field2, Field3, Field4, SumField
SumField is disabled as it is calculated field based on other four fields.
SumField = Field1 + Field2 + Field3 + Field4
It should only sum the values if they are not null. If one of the fields is null it should skip that field.
Also, null field should stay null, the code must not convert it to zero.
Example:
Field1 = 5
Field2 = null
Field3 = null
Field4 = 10
SumField = 15
I know I can do it with IF code for each field, but there is a lot of this fields and it would complicate whole thing.
Any help appreciated.
Comment