Visual Basic |
---|
Public Sub Recalculate( _ ByVal PropertyDef As Long, _ ByVal RecalculateCurrentlyEmptyValuesOnly As Boolean _ ) |
This method is available only if M-Files API is used in the server interface mode.
The method cannot currently be used properly with scripts (such as event handler and workflow state action scripts) due to the following issue:
"Recalculate" in "MFServer" is an asynchronous operation because it might in some cases take a long time to complete. M-Files API hides the asynchrony by monitoring the ending of the background job and returns the control to the caller only after the "Recalculate" operation has finished. To monitor the background job M-Files API needs to perform another login operation to the server. The issue is caused due to the fact that the event handler is executed with a special login and the server does not accept that for the relogin. This means that the "Recalculate" operation basically cannot, for the time being, be used in the event handler. The operation is actually triggered and probably succeeds as well, but an error is however received every time.