I have a small problem I've been trying to figure out (please forgive me if this seems a bit basic for you gurus! :-)
I have a re-useable action with some rows in that re-useable action's local sheet, each one containing a different user name.
The action is shared throughout the test and is called by 8 (non-reuseable) actions.
What I would like to do is use a different row every time the re-useable action is called, so the first time it takes 'Mary', then 'John' etc. So far it keeps using the first row even when it is called the 2nd, 3rd etc time.
I have a similar action that I use to create a client. It has an input parameter which states which client (ie row number) i want to create. I call it like this
RunAction "Create_Client [Create_Client]", oneIteration, DataTable("Client", dtGlobalSheet)
If I want to create 8 clients at one time, I call the action 8 times.
I've managed to use DataTable.SetNextRow to change the row in the Global sheet. What I need is something to change the row in the Local sheet... or is this possible as the Action cannot access any global parameter?
Also, there are two easy ways to pass parameters from one script to another (probably more than two but these are the two that I use).
1. Store the row you want in an Environment Variable.
2. Pass the row you want as an output parameter of the calling script and receive it as an input parameter of your Create_Client script.
I prefer the 2nd method when one script needs to pass one or more values to one other script, though I use environment variables sometimes, usually when they will be used globally throughout a test that calls many scripts that all want the same variable.
Information on both methods can be found in QTP Help and on these forums.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"