This topic contains 4 replies, has 0 voices, and was last updated by steven_stewart 7 years, 7 months ago.

  • Author
    Posts
  • #23232

    steven_stewart

    Hi All,

    I have what I am hoping is a simple question. I have a number (12) of integer fields on a custom record form. I need to create a total field that will calculate the total sum of the 12 integer fields. Would this be done with a formula on the integer field? (If so, what would that formula look like?) I'm not sure how to go about this. Any help would be greatly appreciated! Thanks in advanced!
    This is a cached copy. Click here to see the original post.

  • #23233

    k_dunc

    Hi Steven,

    Yes, you can use a formula to do this. My recommendation would be that on the field you want to store the 'sum total', un-check the "Store Value" checkbox. Next, in the Validation & Defaulting subtab, check the "Formula" checkbox, then click the little box with the arrow in it next to the "Default Value" field. From here, you can now enter a formula. Use the Field drop-down to find your first integer field. Once you select it, you should see it in the Formula box. After the field ID, add a plus (+) sign, then go back to the Field drop-down and get your 2nd integer field. Keep doing this until each of your 12 fields is in the formula field, separated with a plus sign.

    Hope that helps mate. Cheers,

    K.

  • #23234

    steven_stewart

    Originally posted by k_dunc

    View Post

    Hi Steven,

    Yes, you can use a formula to do this. My recommendation would be that on the field you want to store the 'sum total', un-check the "Store Value" checkbox. Next, in the Validation & Defaulting subtab, check the "Formula" checkbox, then click the little box with the arrow in it next to the "Default Value" field. From here, you can now enter a formula. Use the Field drop-down to find your first integer field. Once you select it, you should see it in the Formula box. After the field ID, add a plus (+) sign, then go back to the Field drop-down and get your 2nd integer field. Keep doing this until each of your 12 fields is in the formula field, separated with a plus sign.

    Hope that helps mate. Cheers,

    K.

    Hi Kirk,

    Thanks for once again trying to help me out haha. I did the above, but it doesn't want to add them up and doesn't seem to listen to the formula without a function. I looked, but there is no SUM function in there. I tried putting SUM in but didn't get anywhere with it. Let me know what you think, thanks again!

    Best Regards,

    Steven Stewart

  • #23235

    steven_stewart

    Okay, I figured it out to some extent. I didn't realize it wouldn't dynamically update while the values were being entered. It seems to only calculate after saving. Is there anyway to get this field to calculate in-line, while the numbers are being entered into the integer fields? Thanks in advance!


    erictgrubaugh replied on 03/27/2017, 12:19 PM: Only a Client script or workflow can do that.

  • #23236

    steven_stewart

    Guys, thanks for all of your help. The client is fine with it adding up after save, actually it works to their advantage. Just for anyone looking to do this, the original reply from Kirk works perfectly, after you save, the values are totaled. If the total needs to be changed, you just open the record and make the appropriate changes to the fields, the value will be recalculated after save.

You must be logged in to reply to this topic.