Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Table in QTP
#1
Not Solved
In QTP it is said that actions datatable are local and values in it could be accessed only the code in the specific actions (like value in Action1 datatable could accessed only by Action1 script), and thats why we have to use global sheet.

But I came across the below function which would take data from different actions table, like if data in Action1 data table and code in Action 2.

Could anyone calrify me if this is feasible and if yes why is it generalized that values in Action data table is local and only values in Global datasheet could be accessed from anywhere?

Code:
DataTable.Getsheet("Action1").GetParameter(A).Value
Reply
#2
Not Solved
Hi

When it comes to tests, actions and the datatable:
1. All actions have an associated datatable with Global and Action tabs
2. Only the top level test (and its action) can access the Action tab (usually Action 1) that is associated with the test
3. Each reusable action access its local Action tab
4. QTP merges all the associated actions Global Tabs into a single global table

The merged global table is accessible to all the actions running in that test.

so - put the code more simply - DataTable ( "Sheet Column" , dtGlobalSheet ) will access the global table from any action,

Its the GetSheet part that picks Action over Global, or in mine dtGlobalSheet )

Hope this helps.

greg
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Missing Resources, Information Pane, Debug Viewer, Run time Data Table not visible Aurodeepta 3 6,976 05-28-2015, 02:52 PM
Last Post: Aurodeepta
  how to move an array to data table jloyzaga 0 2,789 11-08-2011, 07:52 AM
Last Post: jloyzaga
  Using vlookup on data table Setsuna F. Seiei 0 3,512 08-19-2011, 06:43 AM
Last Post: Setsuna F. Seiei
  How do i get the data from data grid by using qtp Madhav 1 5,866 07-10-2011, 03:52 PM
Last Post: rajpes
  Table check point for comparing data of 2 tables ritugoyal 1 2,804 02-06-2010, 12:15 AM
Last Post: rameshrise3

Forum Jump:


Users browsing this thread: 2 Guest(s)