AnsweredAssumed Answered

Card vs Layout miscalculation

Question asked by djchuckg on Nov 6, 2018
Latest reply on Nov 15, 2018 by user19752

I'm working on layout/report that is opened from a layout that allows a user to set report parameter values.


When the parameter layout is opened as a Card, parameters are set, then a button runs a script to open the report. Using this method causes an error in a global variable used to calculate a sum. It appears that the report layout, as it is loads, reads records 1 and 2, and then 1 again.


Record 1 value = 3

Record 2 value = 2


Global variable returns 8 when it should be 5.


However, if I open the parameter layout using a Go To Layout function, and call the report with the same script as when launched from a Card, the global variable returns 5 correctly.


Is there something about Cards that is causing this behavior?


I'm currently using JSON to capture/calculate the global value, I've also used a stand- alone/typical/$$ global variable for this with the same results.


Adding nearly 50 unstored calculation fields would kill performance. I would rather have a slow report vs a slow database.