Highlighted
Absent Member.
Absent Member.
269 views

How to have two global datables for one action so that half script takes one and otherhalf the 2nd?

Jump to solution
I have an invoice page where i insert any no.of row items(suppose my invoice has 10 rows) and
every invoice page has another page where the counties can insert other amounts in few cells.
That is not in a row format but cells where they give the amounts. One invoice (with any no.of rows)
can have only one number in each cell in page2.I parameterized page1 and am able to insert any no.of rows
but when i go to page2 how can i code such that qtp can run such a way that my 10 rows invoice has
some values in page2. When i am using datatable for page2, its creating columns besides the columns of page2 when
i run the action and when its taking row by row my first page1 has no columns of the page2 so the script is failing.
how can i divide the datatables of the objects in page1 and 2 but still run both together in one iteration?

Please help. Thanks
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
Most simplest solution is to use two different actions for two pages and use local datatables for both.

Thanks..
Arpan

View solution in original post

6 Replies
Highlighted
Absent Member.
Absent Member.
Most simplest solution is to use two different actions for two pages and use local datatables for both.

Thanks..
Arpan

View solution in original post

Highlighted
Absent Member.
Absent Member.
You could copy the same value for Page2 against each of the rows in page1.

- Reju -
0 Likes
Highlighted
Absent Member.
Absent Member.
Can you provide some screen images or better describe the steps of your script? It sounds like you could accomplish this with a single sheet but add dynamic code to handle the logic. I can help more if you could provide the screen images.
0 Likes
Highlighted
Absent Member.
Absent Member.
Arpan,
I tried to create two local datatables. But with local datable, and when i select either run on all rows or run one iteration, its like inserting only one row of all 17 rows into the application. Do i need to modify the code for the scrip to insert all rows in one iteration. Because its inserting all rows in one iteration when i use the same code and same datatable but as global. Let me know. Thanks
0 Likes
Highlighted
Knowledge Partner Knowledge Partner
Knowledge Partner
You could use an external Excel sheet to hold the data. That way you can control the read/write to the sheet from your action.


Mark Smith.
0 Likes
Highlighted
Absent Member.
Absent Member.
I believe in your test seeting Run for all rows is set. Please handle the iteration through code as given in your thread http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1379771. If for both the actions, if you manage iterations like this, it will work fine.

Thanks..
Arpan
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.