GetValue

Performs a lookup in group GroupName and retrieves the first value for key KeyName that matches Condition. The condition is specified using basic SQL WHERE syntax. The Condition may be left empty in which case the very first value found for the specified KeyName is returned.

Syntax ​

GetValue(GroupName: string, KeyName: string, Condition: 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
/* retrieves email for John Smith */
var myValue = repoObject.GetValue("Users", "email", " LastName='Smith' AND FirstName='John' ");​​ 
/* retrieves email for first user named Smith */
var myValue = repoObject.GetValue("Users", "email", " LastName='Smith' "); 
/* retrieves email for first user */
var myValue = repoObject.GetValue("Users", "email", "");

VB Script​​

Copy
' retrieves email for John Smith
myValue = repoObject.GetValue("Users", "email", " LastName=""Smith"" AND FirstName=""John"" "
' retrieves email for first user named Smith
myValue = repoObject.GetValue("Users", "email", " LastName=""Smith"" "
' retrieves email for first user
myValue = repoObject.GetValue("Users", "email", "")

Retrieving a KeySet ID

This JavaScript example retrieves the KeySet ID, which is then used to update values in the row.

Copy
/* Get KeySet ID */
var repoObject = new ActiveXObject("RepositoryLib.WorkflowRepository");
var keySetID = repoObject.GetValue("customers", "ID", "CustomerID='CURD654321'");
/* Update Values */
repoObject.SetValueByID("customers", "FormOfAddress", "Mr.", keySetID);
repoObject.SetValueByID("customers", "Country", "US", keySetID);
repoObject.SetValueByID("customers", "Language", "EN", keySetID);