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 11-07-2011, 01:49 AM
Bluemoon Bluemoon is offline
Junior Member
 
Join Date: Sep 2011
Posts: 26
Default Skip a line in CSV File

Hi I'm using the read from csv file and looping it. The problem I have is that I want to skipm a line in the file when it produces a certain result. How do I produce a script that will go to the next line in the text file using an If then statement
Reply With Quote
  #2 (permalink)  
Old 11-07-2011, 06:35 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by Bluemoon View Post
Hi I'm using the read from csv file and looping it. The problem I have is that I want to skipm a line in the file when it produces a certain result. How do I produce a script that will go to the next line in the text file using an If then statement
I'm assuming as you loop through, the task is conducting some kind of action with each result.

So,

Loop through each row in a CSV
If $result does not equal 'xyz'
conduct action
End if
End Loop

There are many variations of this, and many ways to create more complex rules. All depends on what you're trying to do.
Reply With Quote
  #3 (permalink)  
Old 11-08-2011, 04:00 AM
Bluemoon Bluemoon is offline
Junior Member
 
Join Date: Sep 2011
Posts: 26
Default

It's not the loop condition I have the problem with It's how do I get the CSV file to go to next row down in the Filedata() coloum I have specified ? IF I was using excel I would be simple to put in an 'enter' using the insert keystroke command to take to next row down once a certain condition is met

Thanks Anthony
Reply With Quote
  #4 (permalink)  
Old 11-08-2011, 04:44 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by Bluemoon View Post
It's not the loop condition I have the problem with It's how do I get the CSV file to go to next row down in the Filedata() coloum I have specified ? IF I was using excel I would be simple to put in an 'enter' using the insert keystroke command to take to next row down once a certain condition is met

Thanks Anthony
I'm confused, there are two things at play here.

1 - The source of the data - Are you getting this from a .csv file?
2 - Where you are placing that data - Where is this happening?

Filedata() is typically used when you're looping through the contents of a .csv file.
Reply With Quote
  #5 (permalink)  
Old 11-08-2011, 06:59 AM
Bluemoon Bluemoon is offline
Junior Member
 
Join Date: Sep 2011
Posts: 26
Default

Hi

I will try to expian what I mean a little better


1.The souce file is TXT.file
2. I then use the read from txt file comand and Filedata column (2) to get the information I want to loop
3. I then put that information into a web appilication and check it. When I get an error message on on the web application, that the information from the txt file is not valid I what to write a 'IF' statement so that when the error msessage occurs the next line in the column is pasted into the webpage and the loop can continue
Reply With Quote
  #6 (permalink)  
Old 11-08-2011, 07:13 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by Bluemoon View Post
Hi

I will try to expian what I mean a little better


1.The souce file is TXT.file
2. I then use the read from txt file comand and Filedata column (2) to get the information I want to loop
3. I then put that information into a web appilication and check it. When I get an error message on on the web application, that the information from the txt file is not valid I what to write a 'IF' statement so that when the error msessage occurs the next line in the column is pasted into the webpage and the loop can continue
I see. What I said in my original post still seems to be accurate for your case.

Read from .txt
Loop through values from .txt file
Test data in website
If result does not equal error
Perform action
End If
End Loop

The loop will automatically go on to the next line of your .txt file once it reaches 'end loop.' So long as you have the if statement surrounding the action it should work fine.

If you need further help, it would be best to post the task (or send privately if you don't want to post).
Reply With Quote
  #7 (permalink)  
Old 11-08-2011, 07:20 AM
Bluemoon Bluemoon is offline
Junior Member
 
Join Date: Sep 2011
Posts: 26
Default

I'm sorry but I'm still lost .

But loop works fine it's only when the error occus that the loop stops. It does not go to the next row in the column. I have put in an IF web control exists for when the error occurs I just want it to then put the next value in the loop in
Reply With Quote
  #8 (permalink)  
Old 11-08-2011, 07:23 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by Bluemoon View Post
I'm sorry but I'm still lost .

But loop works fine it's only when the error occus that the loop stops. It does not go to the next row in the column. I have put in an IF web control exists for when the error occurs I just want it to then put the next value in the loop in
That's exactly what it should be doing.
You could try error handling (if you have the right version of AA) but you shouldn't have to.

I'd have to see your task to determine where the error is.
Reply With Quote
  #9 (permalink)  
Old 11-08-2011, 09:41 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

yes, if you can, please post a TEXT version instream for us to see.
Reply With Quote
  #10 (permalink)  
Old 11-09-2011, 12:32 AM
Bluemoon Bluemoon is offline
Junior Member
 
Join Date: Sep 2011
Posts: 26
Default TXt File

Hi I've attached a copy of scipt

Thanks for the help

Last edited by Bluemoon; 11-10-2011 at 03:11 AM.
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 05:16 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