updating calculation commando?

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?

you can try databaseManager.saveData(), that will force a save.
or you can use databaseManager.recalculate()…

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

saveData should really be enough!

it does update the field, but doesn’t show it directly on screen, only when you switch records…

try setting the calculation to null…

myCalc = null

thanks, that works… :)

thanks for the quick replies

goldcougar:
try setting the calculation to null…

myCalc = null

Some undocumented feature to get the field updated on the form?

I’m also a bit confused about this one… :?
what is the use to set a calculation to null??

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

I use:

Servoy Developer
Version R2 2.2.7-build 339
Java version 1.5.0_07-87 (Mac OS X)

ok, most likely, an upgrade to Servoy 3.5 would solve your updating issues.

Paul