Hi,
I am using unstored calculations.
I have parent records with children wich als can have children, so 3 levels deep.
I copy the complete 3 levels using databaseManager.copyMatchingColumns.
I do not use autosave.
In 3.5.x and 4.x when I duplicate and then save and commit, all the calculations are done and the result is oke.
in 5.0.1 the calculations are not executed !!!, but when i stop/start the application, the calculations
are executed and everything looks oke.
QUESTION : Has there been a change in the way calculations are triggered in 5.x ???
Regards,
Hans Nieuwenhuis
Hi,
did some further investigation.
It looks like the Commit/Save does not trigger the unstored calculations in 5.x ( it does in 4.x en 3.5.x)
Can one of the Servoyans reply on this issue ??
Regards,
Hans
Hans,
Triggering of calculations has changed in Servoy 5, the number of times that all calculations were invalidated is reduced by keeping better track of which calcs depend on which data.
Can you create a small sample solution that shows this?
Rob
Rob,
Thanks for your quick response.
I’ll give it a try and get back on this.
But I think it is very simple, in 3.5.x and 4.x the unstored calculations where fired on a committransaction/savadata.
In 5.x they do not get fired on the same event.
Regards,
Hans
Hi Rob,
I managed to create a sample solution that gives a problem simular to mine.
Import this solution into 4.x and then :
start solution
make sure that parent id 1 is active (should be oke)
hit the duplicate button
the parent, childs and subchilds are now copied
several calculated fields are now 0
hit the save button and the calculations are all fired and are correct !!!
The totprijs in the top form should be 1946 and it is.
Import this solution into 5.x and then :
start solution
make sure that parent id 1 is active (should be oke)
hit the duplicate button
the parent, childs and subchilds are now copied ( note the new id in the topform )
some calculations are fired immediately, but they give the worng answer ( Totprijs in top form should be 1946 )
now hit the save button, notthing changes. Still wrong value(s)
now start and stop the solution and go to the record you created.
now the Totprijs in the top form should is 1946 as it should be
This is VERY important to us, because we use this al over the place.
And it stops us from going to 5.x
I am also looking into doing a recalc when saving, but this is rather complex.
Please advice.
Regards,
Hans
calcsave.servoy (8.43 KB)
Hans,
This has already been fixed in the next Servoy version (5.1).
It works even better now, the calculation values are correct even before saving.
Expect the first beta of 5.1 early this year.
Rob
Great news Rob,
Servoy keeps surprising me with there increasing quality and speed of development and bug-fixing !!!
Regards,
Hans Nieuwenhuis
Hello Hans and Rob,
It wonders me why you are so happy about the speed of this bug-fix Hans (early 2010 ?)
I have quite a bit of inconvenience of this bug.
The situation is that the bug is introduced in v5.0 and v5.0 is no longer in beta-stage…
Harjo
January 6, 2010, 1:42pm
9
Hi lambert,
did you report this to Servoy in there system, and make a sample case?
Hi Harjo,
It’s already fixed says Rob but we have to wait till early 2010
For now I issue databaseManager.recalculate(foundset.getRecord(foundset.getSelectedIndex())) in several of my forms onPostSave triggers…
Hi,
It is almost early 2010, is’nt it ?
Regards,