![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I'm a new AA user and am having trouble with a list variable. I have a spreadsheet with values such as operations\onestop\mmkt. I've set up a loop based on the spreadsheet, and want to take the values, use a String Operation to split them based on the backslash, the do a loop with each of the values. When I split them, I want to put the values into a list variable, but it doesn't seem like I can create a list variable that doesn't already have values in it. Any ideas about how to create a blank list value, or if I'm totally thinking about this in the wrong way? |
| |||
| Quote:
When you split a value, how may individual values does that create? You can probably just assign them to individual variables and do whatever action you want to take. So, Loop through values in Excel String manipulation on $Excel column(1) and assign to $variable1 String manipulation on $Excel column(1) assign to $variable2 Loop based on some condition ....Some action with $variables End Loop End Loop |
| |||
| Quote:
1 - Write the results into a database (MS Access is fine). Then loop through the results of the table using $Dataset Column(1)$. To function properly, you'll have to delete the results of the table before you split the next Excel value. This is actually much easier than it sounds and is the most foolproof. 2 - Save the results elsewhere in the same Excel spreadshsheet such as several columns over or in another worksheet. Then grab those results with AA and loop through them using $Excel Column(1)$. This will work, but lots of stuff will bounce around on the screen - something I always try and avoid. 3 - Log the results to a .txt or .csv file. Then loop through the results using $File Data Column(1)$. You don't even ever have to open the file. Pretty easy, just remember to delete the file before grabbing the next Excel value. 4 - A bit more involved, but you can write it to a notepad file and save it as an .html file and place the results in an HTML table. Then you can open the file in Internet Explorer and grab the results from an IE table. You can loop through these results using $Table Column(1)$ - just remember to delete the file before grabbing the next Excel value. I would only recommend this method for very specific data sets - not sure exactly what yours consist of. These will all accomplish the same thing as a list variable. |
![]() |
| Thread Tools | |
| Display Modes | |
| |