How Can I express in UI Path: IF Current Row = 1 and Current Row + 1 > 1

155 Views Asked by At

I have an excel with more than 100 products. In Column A I have numbers that indicate if its a complete new product or if its a similar product.

When CurrentRow in Column A = 1, then we are talking of a new product. When The subsequent row is 2 or >1, then we are talking of similar prodcuts. When The subsequent row is 3 or >1, the we are still talking of a simiar product.

Finally when the Current Row meets a 1 again, we are takling of a new product.

With that info I intend to do the following:

If CurrentRow = 1 and CurrentRow + 1 = 1, then we are talking of a unique product, so then we will go to link in Column C, get link, use browser take screen shot and paste in Power Point with “Templeate 1”.

If CurrentRow = 1 and CurrentRow + 1 > 1, then we are talking of a product with similar products, so then we will get link in Column C, use browser, take screen shot and paste in Power Point using “Templeat 2”.

So my problem is more with the logics of how to express:

CurrentRow and a CurrentRow +1

I tried: IF Current Row = 1 and Current Row + 1 > 1

1

There are 1 best solutions below

0
On
  1. Use Read Range Workbook or Excel Activity and store in an datatable variable(i.e Product_DT)
  2. Use For each datatable and provide the datatable variable then inside for each.
  3. Put If activity where the condition will be CurrentRow("Column A") = 1 and in Then block provide your usebrowser ,take screenshot and add to powerpoint.This will get all the new products in column A (you have to use that column name).
  4. In else block use the provide your usebrowser ,take screenshot and add to powerpoint.

Just check for CurrentRow = 1 will do the work for your use case.