PDA

View Full Version : Access Parameters of a Subroutine Call from script


AndyFarr
08-27-2004, 04:56 AM
I would like to read the parameters of a subroutine call from script.

I cant seem to do this. Any Suggestions

Step.Property("_EMAIL_ADDRESS") does not work

and

Step.Property("ParamValues") may not return the correct parameter as there is more than one parameter.

The one I want is Marked with Array='0' in the XML but there is nothing in the help about accessing Array Properties.

AndyFarr
08-27-2004, 05:10 AM
Sorry Just took a punt and tried

Step.Parameter("ParamValues")(0) and it worked

kinook
08-27-2004, 11:41 AM
I think you meant Step.Property("ParamValues")(0)

Yes, array-type properties (for instance Subroutine Call action parameter names/values, VisBuildPro Project parameter names/values, and COM+ action properties/values) are returned as variant arrays. You can also use code like this to iterate over the values in the array

arr = Step.Property("ParamValues")
For i = 0 To UBound(arr)
Builder.LogMessage arr(i)
Next

We'll get the docs updated as well.