View Single Post
  #1 (permalink)  
Old 02-01-2010, 08:45 PM
Tonygets Tonygets is offline
Junior Member
 
Join Date: Nov 2009
Posts: 19
Default matching data to a new session using an access database link

Hi,

Can we please have some assistance writing this basic automation.

Overview of what we are trying to achieve: we are going to write stock quantity values from a csv spreadsheet linked to an Access database (Datafeed Session) to the Stock Upload Session spreadsheet. Then 'hide' and 'disable purchase' for products that are less than 5 quantity in stock for the Stock Upload Session spreadsheet.

I have attached a zip file containing the 2 documents (datafeed document and stock upload document).

Can you please link the ‘datafeed.csv’ file to the Access database file. Then create a task that matches Column A ‘Sku’ from stock_upload.csv (starting at row 2) to Column A ‘code‘ in the Datafeed.csv document (I think this will need to be written using an SQL query). If the value matches for the active row then copy the data from Column K ‘stock level’ of the Datafeed session to Column C ‘InStock’ of the Stock_Upload Session.

Loop through the Stock_Upload session until all rows have been matched. If a row in Column A of stock_upload session does not match a value in Column A of datafeed session then move to the next row of stock upload session. Once all rows have been matched then close Datafeed session (no need to save).

Then in Stock_update session:

Start at row 2
- For active row, IF value in Column C ‘InStock’ is greater or equal to 5 THEN set value of Column E ‘DisablePurchase’ to ‘FALSE’. OR
- For active row, IF value in Column C ‘InStock’ is less than 5 THEN set value of Column E ‘DisablePurchase’ to ‘TRUE’ AND
- For active row, IF value in Column C ‘InStock’ is greater or equal to 5 THEN set value of Column F ‘VisibilityId’ to ‘0’. OR
- For active row, IF value in Column C ‘InStock’ is less than 5 THEN set value of Column E ‘VisibilityId’ to ‘1’.

Then Save and Close the stock upload session.

Help with this automation is really appreciated.

Kind regards,

Anthony
Attached Files
File Type: zip datafeed stock upload.zip (8.7 KB, 8 views)
Reply With Quote