Posts: 5
Threads: 1
Joined: Jun 2010
Reputation:
0
06-16-2010, 12:36 PM
Hi,
we have one variable like 'irow' in action1 we need to fetch the value of that variable into another external actions (action2,action3 etc) called in same action1..Please guide..
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
06-16-2010, 01:29 PM
you can use action parameters or define this as environment variable. also you can define the variable public in a library file.
Posts: 5
Threads: 1
Joined: Jun 2010
Reputation:
0
06-16-2010, 02:35 PM
We tried it buts itsnot working..we define the variable in a library file...buts its notrpicking values in other actions..can you pls specify how we can define it public..?
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
06-16-2010, 02:50 PM
is there any error you receive or simply the variable returns empty?
did you add the library as resource?
Posts: 5
Threads: 1
Joined: Jun 2010
Reputation:
0
06-16-2010, 03:11 PM
No error ..variable returns empty...
Yes i add library as resource..Please check
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
06-16-2010, 03:47 PM
Yes I have just checked and it works for me.
try this and let me know if it works
create a new library file - lib1
add statement - Public TestPublic
Create a new test - "test1"
add statement - msgbox TestPublic
add library to resource
Create a new test again "test2"
add statement - TestPublic ="this is a public variable"
call the test created earlier
add library to resource
Posts: 5
Threads: 1
Joined: Jun 2010
Reputation:
0
06-16-2010, 04:17 PM
It works ..Saket...thanks for the help..
Posts: 5
Threads: 1
Joined: Jun 2010
Reputation:
0
06-16-2010, 05:27 PM
Hi Saket,
That problem resolved now we have another issue...we need to increment the value of variable..like in first go its 2 in all actions , in second go it should 3 in all actions ...but as we specify it in library file its increments only in main action for rest it picks same value...pls advice...
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
06-17-2010, 10:11 AM
It should be working, I will take the same example again
in main script (Test2) define TestPublic as 'TestPublic =1'
in test1 add statement 'TestPublic =TestPublic +1' after message box
create a new test add statement , msgbox TestPublic.
add library as resource
call this in your main script and run
you will get the desired result, from the first action it will return 1 and from second will return 2 after incrementing it.