![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
How can the control be still in the same task even if there is an error caught by the error handler. I need to just need to exit a loop in case of an error. Is there any option to achive this. please sugest. Thanks |
| |||
|
Hello, It can be done using Automation Anywhere. What you have to do is, . Create a variable that would read value from a text file. . Using Log to File command initialize that variable with any value say 'False'. . In Error Handling command, select option to log to a file in case of error and change the value of that variable to say 'True'. . Inside loop, using 'If Variable' command check if the variable value is 'True' then exit the loop using Exit Loop command. We have attached a sample task for your reference. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder. Before running this task create variable, $ErrStatus$ that reads value from a text file. Note: variables are case-sensitive. To create a variable that read from text file, please follow below mentioned steps: 1. Go to Tools->Variable Manager in Automation Anywhere. 2. Click on 'Add New Variable'. 3. In 'Name' field, enter variable name i.e. ErrStatus. 4. Select 'Read from text file' radio button or option. 5. In 'Value' field, specify the path of text file i.e c:\Temp.txt. 6. Press 'Save' button. 7. Press 'Ok' button. Now run the task. This task would enter data into a notepad file in a loop. You need to close the notepad file after few iterations of loop in order to create an error. As soon as the error would be generated the task would come out of the loop. Hope that helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |