SetValue

Updates multiple keysets in group GroupName by setting the key KeyName to Value for all keysets that match Condition. The condition is specified using basic SQL WHERE syntax. The Condition may be left empty in which case all keysets in GroupName are updated. Note that KeyName must exist in GroupName, otherwise an error is raised. The method returns an array of the keyset ID's that were updated ( [1,2] ), or an empty array ( [] ) if no keysets were updated.

Note: There is currently no Update feature in the API for a whole KeySet (a row).

Syntax

SetValue(GroupName: string, KeyName: string, Value: string, Condition: string): string

Examples

In each of these examples, the object repoObject is deemed having been obtained through a call to the COM object "RepositoryLib.WorkflowRepository" (see Obtaining an instance of the Repository Object).

JavaScript

Copy
repoObject.SetValue("Users", "FormOfAddress", "Mr.",  "Gender='M'" );
repoObject.SetValue("Users", "FormOfAddress", "Ms.",  "Gender='F' AND MaritalStatus='Married'" );
repoObject.SetValue("Users", "FormOfAddress", "Miss", "Gender='F' AND MaritalStatus=''" );

VB Script​​​

 

Copy
repoObject.SetValue "Users", "FormOfAddress", "Mr.",  " Gender=""M"" "
repoObject.SetValue "Users", "FormOfAddress", "Ms.",  " Gender=""F"" AND MaritalStatus=""Married"" "
repoObject.SetValue "Users", "FormOfAddress", "Miss", " Gender=""F"" AND MaritalStatus="""" "