Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-14-2011, 02:50 PM
brianh brianh is offline
Junior Member
 
Join Date: Oct 2011
Posts: 2
Default List variable with no values?

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?
Reply With Quote
  #2 (permalink)  
Old 10-15-2011, 05:56 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by brianh View Post
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?
You likely don`t need to use a list variable depending on just what you`re trying to do.

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
Reply With Quote
  #3 (permalink)  
Old 10-17-2011, 06:53 AM
brianh brianh is offline
Junior Member
 
Join Date: Oct 2011
Posts: 2
Default

Thanks for the reply. After the split, I could have anywhere from 3 to 6 strings. That's why I wanted to do a list variable rather than having to do some sort of If...Then thing...
Reply With Quote
  #4 (permalink)  
Old 10-17-2011, 07:53 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by brianh View Post
Thanks for the reply. After the split, I could have anywhere from 3 to 6 strings. That's why I wanted to do a list variable rather than having to do some sort of If...Then thing...
You have several other options:

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved