Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get parameters of action
#1
Not Solved
Hi again,

In my test, I'd like to parameterize my actions using action-parameters or external excel-files.
The excel-files contain testdata, that is imported into the local datatable of an action. I have created a vbscript function to import this data. This function is called from within the action.
But there should also be the possibility to pass data into an action, using action-parameters. However, to be most flexible, I thought it would be best to insert the data, passed in by parameters into the local datatable. So the action will not use the data from the parameters directly, but from the local datatable (which is filled either by an external Excel-file, or data passed in by parameters).

This works, if I do the filling of the local datatable manually. But it would be better to create a vbscript-function, which I could call from any action, which will load either the given excel-file or the parameters into the local datatable.

But in order to create such a function, I have to find out all the parameters. Is there a possibility to get the parameters (best by iterating through all parameters?).

At the moment I fill my local datatable with parameter-data like this:
Code:
DataTable("name1", dtLocalSheet) = parameter("name1")
DataTable("name2", dtLocalSheet) = parameter("name2")

As you can see, the datatable-columns have the same names as the parameters. If there was a way to somehow iterate through the parameters and insert the value of the parameter into the datatable-column with the same name, it would be great.

I have something like the following code in my mind:
Code:
Dim iterator
For iterator = 1 To Parameters.Count Step 1
  Datatable(Parameters(iterator).Name, dtLocalSheet) = Parameters(iterator).Value
Next

Is there any possibility to do something like that?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  optional parameters Ishul 5 8,248 04-03-2012, 11:18 PM
Last Post: supputuri
  Exception handler parameters Ashok Kumar 1 2,749 12-09-2011, 10:23 PM
Last Post: supputuri
  Difference between parameter tabs in Action Properties and Action Call Properties. vibhakhandelwal 0 4,116 11-16-2011, 01:34 PM
Last Post: vibhakhandelwal
Exclamation how to Pass Optional Parameters in VBS? ShrikantBiradar3449 1 8,371 06-13-2011, 03:12 AM
Last Post: Skepsis

Forum Jump:


Users browsing this thread: 2 Guest(s)