Viewing 5 replies - 1 through 5 (of 5 total)
  • I have a complex calculation process as well on my website, and I was having a similar problem to you (with the “live site” not updating properly). I think, based on what I saw in your videos, that we may have had the same underlying issue.

    You hide certain fields from your screen based on specific criteria. But, if your formulae are anything like mine, they reference the values stored in those fields during the computation phase. But, if the fields are not visible, it’s unclear what values (if any) they will hold at the point when the calculation is done. What I did to solve this issue was to use COMPUTED FIELDS in all my formulae (didn’t use a direct on-screen field except when that field was ALWAYS displayed). I would initialize the computed fields with the appropriate values (e.g. 0 for a counter or total, 0 for a multiplier or discount, etc.) and use the formula in the COMPUTED FIELDS to grab content from actual screen fields ONLY IF THEY WERE VISIBLE (using IF/THEN/ELSE logic within the formulae). This ensured that the individual COMPUTED FIELD components always had a valid value. The final computations were performed using the individual COMPUTED FIELDS which always had valid data in them, even if the underlying data was not visible on the screen.

    Thread Starter Sam Potter

    (@sam-potter)

    Great feedback @jefromcanada. For me I was not calculating hidden fields, only fields that were visible. It works fine in the Safari browser but not in the Chrome browser. This tells me that there is a browser compatibility issue.

    I understand what you’re saying. And I know it’s working for you in Safari, but since Chrome is considered the industry standard (and its engine is used in Chromium, Edge and to a lesser extent Firefox), you want it to be working on that standard.

    What I was referring to was your video, where you have a lot of fields that appear to be “conditionally displayed”. If you’re doing UNCONDITIONAL calculations based on the values of those CONDITIONAL fields, you may get unreliable (or non-functioning) results.

    Rather than saying C = A + B (where A or B may be conditionally unavailable), you may want to try something like C = RNIF(A == “”,0,A) + RNIF(B == “”,0,B). That way, if one or more of the components in your formula isn’t “available” with a value, you are forcing a value that will not adversely affect the outcome of your calculation.

    Thread Starter Sam Potter

    (@sam-potter)

    Thank you again @jefromcanada I am only calculating displayed fields but as you point out many of the fields being calculated are displayed conditionally. I am not familiar with the “RNIF” call.

    Would you be available to write this formula for me for a little money exchange so I don’t have to take the time to mess with it?

    I would suggest you taking a small portion of your project to forward, but not sure whether there is a secure way for me to contact you without posting in public here.

    I saw on your site that you have a link to your design business. Maybe I should send email to you directly there so we can trade direct contact information.

    The reason I am suggesting a small portion of the project is so I can see whether use of the conditional math solves the issue you’re having with chrome, since my formulae are all working with both chrome and firefox.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Math formula works in Preview but not Live’ is closed to new replies.