8.7

Table Of Contents
/* both methods perform the same task */
repoObject.SetValueByID "Users", "FormOfAddress", "Mr.", 10
repoObject.SetValue "Users", "FormOfAddress", "Mr.", "ID=10"
Updating a row
There is currently no 'update' feature in the API for a whole KeySet. This JavaScript example
retrieves the KeySet ID, which is then used to update values in the row.
/* Get KeySet ID */
var Repo = new ActiveXObject("RepositoryLib.WorkflowRepository");
var keySetID = Repo.GetValue("customers", "ID",
"CustomerID='CURD654321'");
/* Update Values */
Repo.SetValueByID("customers", "FormOfAddress", "Mr.", keySetID);
Repo.SetValueByID("customers", "Country", "US", keySetID);
Repo.SetValueByID("customers", "Language", "EN", keySetID);
Version
Returns the version of the DLL library used by the Repository.
Syntax
Version(): string
Stopping Execution
When using a script, you may come to a point where you'd like the task to fail (raise an
error)and trigger your On Error tab under certain conditions. This can be done by using the
scripting language's built-in error features, described here.
Note that the value or description of the error will not be available to your error process if one is
used. However, when available, a description of the error message will be logged in the Watch
log.
VBScript
In VBSCript, the Err.Raise method will halt the execution of the script and trigger the On Error
tab. When using On Error Resume Next, raising an error will not stop execution. See MSDN for
the Raise method properties and this page for a list of available errors to raise. In the case of
VBScript, the error number used will determine the message shown in the log.
Page 140