Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing Values from ReusableAction To mainscript
#1
Not Solved
Hi,

I am using Reusable Action in Script where the Reusable action performs some checks and then have to pass the values to MainScript.
For this I am using Globaldatasheet as means of communication between ReusableAction and Main script.

DataTable.GlobalSheet.AddParameter "Disp", PrdName

the Above line works great if there is only one iteration. For the second iteration in dataTable it is unable to write "Disp" value in second row.
How can I do this?
Note: I have tried using environment variables but as I am new to that concept was not clear on that so I am using Globaldatasheet.
Please suggest.

Basically For each iteration in Main Sript, I want the Reusable Action's output to be written to Globalda
Reply
#2
Not Solved
I have got the answer for this.

Code:
On error resume next
CheckForParam = DataTable("Display", dtGlobalSheet)

If err.number <> 0 Then
'Param does not exist and must be added
DataTable.GetSheet("Global").AddParameter "Display",PrdName
Else
'Param exists and should be updated
DataTable.Value("Display",dtGlobalSheet) = PrdName
End If
Reply
#3
Not Solved
A little more elegant is using Environment("ActionIteration") to determine if it's the first iteration and thus the parameter has to be added.

Of course you can also pass values between actions using the input- and output-parameters of an Action.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Passing Object to Function Mozza 2 1,930 08-02-2018, 03:22 AM
Last Post: Mozza
  Passing objects to Functions vinod.nhce 0 3,324 03-13-2014, 06:09 PM
Last Post: vinod.nhce
  Passing the object list as the argument arun2kindia 1 2,361 07-28-2009, 03:01 PM
Last Post: manabh
  How to compare local sheet values with run time data table values? test71 2 8,543 03-14-2008, 07:09 PM
Last Post: test71

Forum Jump:


Users browsing this thread: 1 Guest(s)