As mentioned in the title, I will need to loop through the datatable rows using the numbers in the first column (NSN Transfered), but select the items in 4th column (Asset ID), then need to skip the rows with matching data in the first column.
This is just an example as each transaction will be unique.
I can get the For Each Row activity to identify the first variable of NSNs, then find all the like Asset IDs and select those. An issue I’m having is that it will go to the next row, look up the NSN variable and try to find the Asset ID that isn’t available and move on to the next row. It will do that and waste time trying to find the information that isn’t available anymore.
My question is: How would I be able to skip the next row if it shares the same information as the row above in the same column (NSN Transferred)?
Create a variable lastNSN and at the end of your steps in the For Each, set it to the NSN you just processed. In the If, check if NOT row(“NSN Transferred”).ToString = lastNSN
I’ve been playing with this idea and something isn’t working for me.
I need the current If condition or it doesn’t loop correctly on the data table.
In the “Narrow Selection Field” sequence, I have a type into that selects the current rows’ NSN to narrow the selection field, otherwise it will bring up all the assets available from the customer account (sometimes over 2000+). How would I put that information into the type into to skip the repeating NSNs?
Now it will only loop over the unique values in NSN Transferred. Then within the loop, use Filter Data Table to get all the Iem Description and other values for the current NSN Transferred.
For Each Row in Datatable DT_Main.DefaultView.ToTable(true,“NSN Transferred”)
** Filter Datatable DT_Main → DT_Items (filter: “NSN Transferred” = CurrentRow(“NSN Transferred”).ToString
** For Each Row in DT_Items
*** processing steps to enter into the web page or whatever