Ok, I have been working on a new little app and this time around I decided to do a lot of the math using calculated values on the form instead of using calculated fields in the table or intense scripts.
On the surface it all works fine for the math on the form but I also need one Calculated Value that is a total of several other calculated values to be written to a field in a table so it can be used on other forms without having to recreate all the calculated values again and again on each form.
There is no direct way to put a calculated value on a form into a field of a table so I tried the following.
vn_subtot = CALC->Price_Subtot
parentform:SUBTOT.value = vn_subtot
And Also;
parentform:SUBTOT.value = CALC->Price_Subtot
Now here is the screwy part.
For awhile it will work with the;
vn_subtot = CALC->Price_Subtot
parentform:SUBTOT.value = vn_subtot
Then that will stop working and throw a script error so I switch to;
parentform:SUBTOT.value = CALC->Price_Subtot
And then that will work for a while and then start throwing a script error.
Basically every time it throws a script error I just change the script method and it starts working again for a little while. Which make absolutely no sense. What is even weirder is when I use the variable vn_sutot to store the value and then write it to the SUBTOT.value, the variable vn_subtot remains zero even though it transfers the value of Calc->Price_Subtot to the SUBTO.value
script-error.png
Unless I can find a simple and reliable way to store the values in Calculated Values on a form into a table field, I think I will not try and use Calculate Values anymore.
On the surface it all works fine for the math on the form but I also need one Calculated Value that is a total of several other calculated values to be written to a field in a table so it can be used on other forms without having to recreate all the calculated values again and again on each form.
There is no direct way to put a calculated value on a form into a field of a table so I tried the following.
vn_subtot = CALC->Price_Subtot
parentform:SUBTOT.value = vn_subtot
And Also;
parentform:SUBTOT.value = CALC->Price_Subtot
Now here is the screwy part.
For awhile it will work with the;
vn_subtot = CALC->Price_Subtot
parentform:SUBTOT.value = vn_subtot
Then that will stop working and throw a script error so I switch to;
parentform:SUBTOT.value = CALC->Price_Subtot
And then that will work for a while and then start throwing a script error.
Basically every time it throws a script error I just change the script method and it starts working again for a little while. Which make absolutely no sense. What is even weirder is when I use the variable vn_sutot to store the value and then write it to the SUBTOT.value, the variable vn_subtot remains zero even though it transfers the value of Calc->Price_Subtot to the SUBTO.value
script-error.png
Unless I can find a simple and reliable way to store the values in Calculated Values on a form into a table field, I think I will not try and use Calculate Values anymore.
Comment