I have a Botox injection form that is used in a Neurology department. The form calculates the total units injected and number of vials used based on information entered in previous fields. Everything works great unless you put the note on hold. When you open the note after having placed it on hold, the Total Units Injected and Number of Vials totals change to a much less number. I believe I have read discussion before on the forum about a cause for this but I can't find it now. Help would be appreciated.
Thanks
Debbie
When performing calculations in a form try to avoid using watcher expressions and global variables. I set calculations up like this (all in the white space on the right) -
Declare any varibales that you need that are not already edit fields in the form -
{!document.variable1}
{!document.variable2}
{!document.TotalUnitsInjected}
Line to perform calculation -
{document.TotalUnitsInjected = fnCalcUnitInject(document.formvariable,document.variable1)}
Function doing the calculation -
{fn fnCalcUnitInject(var1,var2){
//do calculation here
}}
If you need clarification or want me to look over the form I would be happy to do so.
Mike