Results 1 to 5 of 5
  1. #1

    passing parameters between actions

    I have two actions named phymax & qty ,qty being nested in phymax.I would like to pass a value from phymax which is set to the value from the datatable.I didi the following steps.
    I added an input action in test-->settings-->parameters with name phymax ,type any,default =3.I then added the same values to the action property of action 'qty'.Now for action call properties i first changed the expert views action call as run action "qty", "1-1","phymax" which added the value in action call properties as phymax.I run the test with this settings.I had the input parameter value of phymax as 3(default value) in the test reulsts window.(while the phy max value in test is 1).Now i changed the action parameter value to be a parameter of type environment,name arg_phymax,value as phymax.I now have the same value in the test result window.When i had the debug viewer,the value for phymax is taken as empty.

    I know im not entering a correct value for the action call property.Could somebody guide me what should i enter there & what else should add or change in my script.

  2. #2

    Re: passing parameters between actions

    To pass a value from the datatable to qty from phymax:

    Firstly, setup an Input parameter in the action qty. Call it x for example.

    Now, in phymax, create a variable, and assign it your value from the datatable. Eg: y = datatable("Abcd",dtLocalSheet)

    Now, to get this value passed to qty run the command:
    RunAction "qty", oneIteration, y

    Now, in qty if you had a variable called valuefromphymax = parameter("x")
    use msgbox valuefromphymax and you should see it passed correctly.
    I'm not a complete idiot - some parts are missing.

  3. #3

    Re: passing parameters between actions

    when i did the same thing as u suggested i have an empty message box with VBscript written on it.

  4. #4
    Junior Member
    Join Date
    Sep 2001
    bangalore, kk, india

    Re: passing parameters between actions

    Assign the values to the output parameters of the first Action.
    In action call properties, pass this values to some variable.

    In the second Action, assign these variables to a input Parameter(assigned to output parameter in Action 1)
    For example:

    RunAction "Action1 [Action1 ]", oneIteration, Para1, Para2

    RunAction "Action2 [Action2]", oneIteration, Para1, Para2

  5. #5

    Re: passing parameters between actions

    Thanks for the help.It worked.The variable was in an if condition.for some reason the statemnts within the if condition stopped working,which i didnt realize.i could do it without adding the output parameters for the calling function.Thanks a lot.It was very helpful.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:48 PM.

Copyright BetaSoft Inc.