![]() |
| |||||||
Automation Anywhere Server & Enterprise Post messages and questions related to Automation Anywhere Server or Automation Anywhere Enterprise here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I developed a script that uses multiple variables that I defined. The script works fine on my license. I uploaded the script to the server & had another user downloaded that same script on a runtime client. When the runtime client user runs the script, the script ignores the variables & ultimately gets stuck in a loop. I looked at the Variable.dat configuaration file on my machine & the runtime client's machine, but both files look the same. Although, it doesn't appear that my Variable.dat file has any of the variables I named within any of my scripts. So perhaps the user defined variables are written to a different config file. I need some ideas on how to trouble shoot this problem. Thanks |
| |||
|
Hello TxHusker, Warm welcome to our Automation Anywhere Forum site. Instead of creating a .dat file for global variable, you will have to create a text file in which you will have to write down: Variable1=Value1 Variable2=Value2 Variable3=Value3 and so on and create variables with the same name in the task and assign values using "Read from text file" command (the text file you already created) in your task and you will be able to use the listed variables as global variables. The text file's path that you created should be either: 1) Server Path where the file is located. OR 2) You can put that file in the common directory. OR 3) Copy the text file and paste it in your local drive and select that path. Please let us know if you have any doubts. Thanks & Regards |
| |||
|
Thank you for your response. I should clarify a bit: I'm not trying to set global variables, however, I was under the impression that the local variables on a script was written to some configuration file. Apparently that is not the case. I wouldn't mind doing what you are suggesting, but my code is writing values to the variables for another line of code to evaluate & decide what to do from there. For example: String Operation: Get length of "$Dataset Column(2)$" and assign output to $FieldLength$ If $FieldLength$ Equal To "3" Then Keystrokes: $Dataset Column(2)$ in "APP" Else Keystrokes: $Dataset Column(2)$ in "APP" Keystrokes: [TAB] in "*Phase 3" End If I don't know if what you are suggesting would work because I need to write the variable values somewhere. So my question is if I set local variables on a script & upload that script to the server for another user to pull down, should I expect those local variables to work when that user runs that same script from his license? If I should expect them to work, then how should I trouble shoot the problem if the variables are not working? Keep in mind, the script works fine when I run it. The issue is when a user tries to run it on his own license. Is the problem with application itself (i.e, local variables are buggy) or is the issue with the actual script itself? Again, thank you for your time |
| |||
|
Hello TxHusker, Normally when we copy the task from one machine to another, the variables related to it gets copied automatically but in your case, we will have to take a look at the scenario so if you can send us your contact details (name, contact number, email address) to support@automationanywhere.com we will have an online meeting and suggest you with proper solutions. Thanks & Regards |
![]() |
| Thread Tools | |
| Display Modes | |
| |