Calculation Field: Sum even if empty

Viewing 2 reply threads
  • Author
    Posts
  • January 26, 2018 at 8:11 AM #27121

    scneophyte
    Participant

    Last question of the day: I have a workaround for this but just curious if anyone else feels the same.

    Calculations should assume that empty field = 0 so that calculations that sum several fields will return a value even if not all fields contain a value.

    The workaround is to use IfEmpty for each field but that increases the development time for the calc, possibility of errors, etc.

    Thanks.

    January 26, 2018 at 1:38 PM #27129

    Brendan
    Keymaster

    So you’re referring to the Calculation field formulas and not the calculations displayed at the bottom of the records list? Those already ignore empty values.

    There was some debate a long while ago whether empty values should be treated as 0 or not. A workaround for that is to just set the Default Value to 0 if that’s how you want empty values to be treated. Or to add the IFEMPTY() function to your formulas.

    Perhaps just set the Default Value to 0 to make it easier. If you don’t have 0 in all your empty fields you could sort your form by that field so they’re all together, then use the Fill Down function to set them all to 0 in one quick go. Then from then on empty values will default to 0.

    January 27, 2018 at 7:14 AM #27141

    scneophyte
    Participant

    Fair enough. I will set the default values to 0. Since TF has to satisfy everyone I understand leaving it as it is.

Viewing 2 reply threads

You must be logged in to reply to this topic.