Get your 6-month No-Cost Opt-Out offer for Unlimited software automation!

Method SetValue

Sets value into the current Iteration row of a Datatable parameter

Usage

Function Datatable.SetValue( 
        String Name,
        Object Value
)

Parameters

Name

Type: String

The name of the parameter (column name)

Value

Type: Object

The value to set

Returns

No return value

Example

In this example we will get phone number by username and set it to datatable

VBScript

Application("Demo").View("DemoView").Object("txtUsername").SetProperty "text", Datatable.Value("Username")
Application("Demo").View("DemoView").Object("btnGetPhoneByUsername").Click
phoneNumber = Application("Demo").View("DemoView").Object("Phone").GetProperty("text")
Datatable.SetValue "Phone", phoneNumber

JavaScript

Application("Demo").View("DemoView").Object("txtUsername").SetProperty("text", Datatable.Value("Username"));
Application("Demo").View("DemoView").Object("btnGetPhoneByUsername").Click();
var phoneNumber = Application("Demo").View("DemoView").Object("Phone").GetProperty("text");
Datatable.SetValue("Phone", phoneNumber);

Documentation Categories

ZAPTEST

FARM

LOAD