M-Files API 23.11.13135.0
Recalculate Method
VaultPropertyDefOperations Object : Recalculate Method
The property definition the values of which to recalculate.
True if only the currently empty values should be recalculated. Otherwise all values will be recalculated.
Description
Recalculates the automatically generated values for the specified property in all existing objects.
Syntax
Visual Basic
Public Sub Recalculate( _
   ByVal PropertyDef As Long, _
   ByVal RecalculateCurrentlyEmptyValuesOnly As Boolean _
) 
Parameters
PropertyDef
The property definition the values of which to recalculate.
RecalculateCurrentlyEmptyValuesOnly
True if only the currently empty values should be recalculated. Otherwise all values will be recalculated.
Remarks

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.

See Also

VaultPropertyDefOperations Object  | VaultPropertyDefOperations Members