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-12-2009, 10:12 PM
Tonygets Tonygets is offline
Junior Member
 
Join Date: Nov 2009
Posts: 19
Default Cross referencing rows written from one spreadsheet to another

Hi,

I am using AA 5.5.1 Enterprise.

Background to this automation:

My automation is designed to extract orders out of a Master Orders spreadsheet and create a new Purchase Orders spreadsheet with values from the Master spreadsheet written in the correct format required by our supplier. In the Purchase Order spreadsheet we are writing the ‘purchase order number’ value in Column A starting at row 2. We need to also write this ‘purchase order number’ value in Column C of the Master spreadsheet for each relevant row that was written across. (So that we can identify what has been ordered and cross reference to invoices).

The step I need help with is:

Once the data has been written from the Master Orders (session: Default) to the Purchase Order file (session: session1) I need to then write each purchase order number back from session 1 into the Default session for the rows that were written into the session 1 AND SKIP other rows that are not relevant.

This can be achieved by matching the common value contained in ‘OrderNumber’ and ‘ExtOrderId’ (Column E in session Default and Column D in session1) between the two sessions AND also ensuring the value under Column H ‘Vendor’ in session: Default (for the relevant row) contains a predefined value (e.g fra). This last step is because an OrderNumber in the session: Default may contain different products from different Vendors that are not relevant to the current Purchase Order.

I have attached a sample of the Master Orders spreadsheet and the Purchase Orders spreadsheet and the code that I have written so far.

Please can you make amendments to my code to achieve the above?

Much appreciated,

Tony
Reply With Quote
  #2 (permalink)  
Old 11-13-2009, 11:36 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

We have amended the task as mentioned. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Please let us know how it goes.

Hope that helps.
Attached Files
File Type: atmn Sample PO Creation for Frag.atmn (11.1 KB, 1 views)
Reply With Quote
  #3 (permalink)  
Old 11-15-2009, 08:24 PM
Tonygets Tonygets is offline
Junior Member
 
Join Date: Nov 2009
Posts: 19
Default

Thanks for that. It works perfectly.

Just a quick question. I notice that you used the $counter$ variable and then assigned it to $rowcount$. Can you please just explain a bit further about how $counter$ should be used and how it works?

Thanks and regards.
Reply With Quote
  #4 (permalink)  
Old 11-16-2009, 05:17 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

$Counter$ returns the current count value in loop. For e.g. in first iteration of loop the $counter$ value would be 1, in second iteration it would be 2 and so on. You can directly use $Counter$ instead of $RowCount$. It is just to make the code understandable we assigned $Counter$ to user variable, $RowCount$, which indicated the $RowCount$ holds the current row number in loop.

Hope that helps.
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 11:02 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