Specifying an Automatic Property Value Using VBScript
Creating customized automatic values and calculated values can be specified in more detail with M-Files API and generic features of VBScript ("Microsoft Visual Basic Scripting Edition"). This section gives instructions on how to use VBScript with automatic values. For the VBScript user's guide and language reference, see the VBScript MSDN article.
The VBScript code for a calculated value is executed whenever a property value is edited. The VBScript code is used for calculating the automatic value, after which the result of the calculation must be assigned to a variable called Output. This value is stored as the value of the property in the object metadata.
The simplest piece of VBScript for formulating an automatic value might therefore look like this:
Output = "Automatic value"
Usually an automatic value uses other object properties, for example, by concatenating them. VBScript code can use the property values and basic information of the same or another object with these VBScript variables:
|
|
|
Do the following steps to use VBScript for calculating an automatic value for a property: