We will now write the PO number we captured from Apptivo to Excel. To update the Excel sheet, we will look up the row based on a combination of supplier details and the item name, and update the last column, PO. To keep things simple for this learning project, we are assuming that each supplier only orders an item once:
- First, let's first check that the PO number is not empty. Add an If control activity with the following condition: NOT string.IsNullOrEmpty(strPO.Trim).
- If the PO number is empty, let's handle the error in the Else block. Add a Log Message with the Log Level set to Error and a Message reading "Cannot Retrieve the PO for this Item Name: "+ strItemName:
- In the Then block, let's open the Data\PurchaseOrder.xlsx Excel file, find the corresponding row based on a combination of ItemName and Supplier and update the PO column. To do that, add...