RemoveKeySets

Deletes all keysets in GroupName that match Condition. The condition is specified using basic SQL WHERE syntax. The method returns the number of keysets that were deleted.
When passing 'ID' as the Condition, all keysets in GroupName will be deleted.

Syntax

RemoveKeySets(GroupName: string, Condition: string): integer

Examples

Basic 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​

repoObject.RemoveKeySets("Users", 'Gender="M"');

VB Script​​​

repoObject.RemoveKeySets "Users", "Gender='M'"
Deleting a row

This script attempts to delete a client from the rows, then returns "true" or "false" in JobInfo variable %9 as a response.

var CustomerID = Watch.GetVariable("CustomerID");
var repoObject = new ActiveXObject("RepositoryLib.WorkflowRepository");
var deletedCount = JSON.parse(repoObject.RemoveKeySets("customers","customerID = '" + CustomerID + "'"));
var answer = (deletedCount > 0) ? "true" : "false";
Watch.SetJobInfo(9, answer);