EricM
September 14, 2007, 11:47am
1
Is there a method to update a calculation?
I have the following situation: I have a record and a calculation that shows in which category the record is stored it returns the full path to the root directory like this:
Cat1 >> sub1 >> subsub1
But when a person changes the category where the record is in, the calc field doesn’t change, but just after a while (not sure what time).
Is it possible to give a commando to recalculate the field?
IT2Be
September 14, 2007, 11:51am
2
you can try databaseManager.saveData(), that will force a save.
or you can use databaseManager.recalculate()…
EricM
September 14, 2007, 11:56am
3
I tried that, now the field is updated, but still shows the old value…
I have this:
controller.saveData()
databaseManager.recalculat(forms.rss_ican_characteristics_basic.foundset);
but it only shows the right value when I first select another record and go back.
also tried application.updateUI(); but that didn’t work
IT2Be
September 14, 2007, 12:04pm
4
saveData should really be enough!
EricM
September 14, 2007, 12:40pm
5
it does update the field, but doesn’t show it directly on screen, only when you switch records…
sbutler
September 14, 2007, 12:53pm
6
try setting the calculation to null…
myCalc = null
EricM
September 14, 2007, 1:01pm
7
thanks, that works…
thanks for the quick replies
ROCLASI
September 15, 2007, 9:27pm
8
goldcougar:
try setting the calculation to null…
myCalc = null
Some undocumented feature to get the field updated on the form?
Harjo
September 16, 2007, 6:07pm
9
I’m also a bit confused about this one…
what is the use to set a calculation to null??
pbakker
September 17, 2007, 7:11am
10
In which version of Servoy are you experiencing the calc not updating?
In Servoy 3.5 there were a couple of improvements to automatic calc updating.
Calcs that are displayed on the screen should automatically update, without tricks.
Paul
EricM
September 17, 2007, 8:50am
11
I use:
Servoy Developer
Version R2 2.2.7-build 339
Java version 1.5.0_07-87 (Mac OS X)
pbakker
September 17, 2007, 8:54am
12
ok, most likely, an upgrade to Servoy 3.5 would solve your updating issues.
Paul