Micro Focus QTP (UFT) Forums
Data Table in QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Data Table in QTP (/Thread-Data-Table-in-QTP)



Data Table in QTP - QTPBeginer - 04-02-2013

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



RE: Data Table in QTP - GregHicks - 08-25-2013

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