Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set the value to the Datatable ?
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
I am getting a value through input box and I am storing that in a variable.
I am getting this my value thru input box,
Code:
Dim i
i=inputbox("enter sysenv")

I need to store this i value to global data table for furthur Action use.
I am able to see lot of examples that,how to set the direct values to the global or local data sheet.

How to set this variable "i"-Value to the global data table?
Any Help?
Thanks
Uma
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
DataTable.Value ("name of column", dtGlobalSheet) = i
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Petes,
Thank you.It is working
Uma
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
I was trying to insert value in Global sheet in data table from variable and for this using the following mentioned code. But the code is not storing the value.
If any one knows how to do than pls let me know.

Code:
Dim res
res = 4
msgbox res
DataTable.Value("RequestID","Global") =  res

Here, RequestID is the column name.
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Ur code is absolutly fine. Please check where u have added the column to your global data sheet.

u can use the below as well.
Code:
Datatable.value("<ColumnName>",dtGlobalSheet)="<Value>"

Regards,
Ankesh
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Uma,

Your script is fine.
You just have to do the below.

After executing the script -> go to test results -> click on "Run-Time Data table" -> you can find the value in Global sheet.

Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Varun,
Pls use the following code and check ur runtime datatable

Code:
Dim res
res = 4
DataTable.Value("RequestID",dtGlobalSheet)=res
it has the value

see the attached file/
Thank you
Uma


Attached Files
.doc   GlobalQTP.doc (Size: 26 KB / Downloads: 454)
Reply
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

I have the similar kind of problem. I am trying to write values on to global data table during run time. When I specified "A" for column name in the above line of code, it is throwing me an error that the column specified does not exist.

Code:
Datatable.value("<ColumnName>",dtGlobalSheet)="Value"

Here, what column name are we referring to? I see column names A, B, C, D....etc. on Global and Action data tables.
Please provide with examples.
Any help is greatly appreciated.
Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Datatable add and datatable import sheet wheelercha 4 33,618 06-14-2012, 04:53 PM
Last Post: Arul
  Multiple Data Set With Different Child Data Set Suba 2 4,207 04-08-2011, 02:07 AM
Last Post: Suba

Forum Jump:


Users browsing this thread: 1 Guest(s)