Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

How to add two numbers in run time data table

This is a discussion on How to add two numbers in run time data table within the QTP forums, part of the Software Testing category; Hi I need to add two numbers in run time data table and apply that value at other place in the same script, is it possible. Sowmini...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 12-01-2008
Junior Member
 
Join Date: Nov 2008
Location: canada
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
sowmini devi is on a distinguished road
How to add two numbers in run time data table

Hi I need to add two numbers in run time data table and apply that value at other place in the same script, is it possible.
Sowmini
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-02-2008
Junior Member
 
Join Date: Dec 2008
Location: Hyderabad
Posts: 23
Thanks: 0
Thanked 3 Times in 3 Posts
Jai Deepu is on a distinguished road
Smile Re: How to add two numbers in run time data table

For i=1 to 2
Datatable.SetCurrentRow(i)
datatable.Value("no",dtglobalsheet )=i
j=j+i
msgbox j
Next


In data table for first column give the name as "no"
At last you will get j=3.
you can use this j anywhere in the script.
Reply With Quote
  #3 (permalink)  
Old 12-02-2008
Junior Member
 
Join Date: Dec 2008
Location: Hyderabad
Posts: 23
Thanks: 0
Thanked 3 Times in 3 Posts
Jai Deepu is on a distinguished road
Re: How to add two numbers in run time data table

For i=1 to 2
Datatable.SetCurrentRow(i)
datatable.Value("no",dtglobalsheet )=i
j=j+i
msgbox j
Next
Reply With Quote
  #4 (permalink)  
Old 02-26-2009
Junior Member
 
Join Date: Feb 2009
Location: hyderabad
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
prabhakar123 is on a distinguished road
Re: How to add two numbers in run time data table

Hi Devi

You can add two numbers in Run time data table like this.

x = Datatable.Value("firstFieldname",1)
y = Datatable.Value("secondFieldname",1)

z = x+y

You can use z any where in your action


Thanks,
Prabhakar
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Getting #REF in data table when data is referred from external sheet suryaperi WinRunner 1 09-12-2008 07:18 AM
Test data flow from table to table vaibhavst Test Cases 3 07-31-2008 06:36 AM
How to insert data from one table to an empty table sahanai mishra Oracle Apps 1 08-11-2007 11:45 AM
How a java table be brought to data table? dhandhan QTP 0 04-15-2007 06:14 AM
I want to load odd row numbers data ggk.krishna Data Warehousing 0 03-30-2007 03:41 PM


All times are GMT -4. The time now is 06:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved