Hey Everyone, I have a data table which looks like the above image.I intend to fill a form online using data from an excel sheet. I am using Excel application scope, using “For each row”. There is condition I want to execute like, while the bot is inserting the data from row 1, it should check for element in row 2 for column A and if the “DocNo” (in row 3 or cell A3) is blank it should check “HsnCode” (row 3 or cell B3). If the “HsnCode” is not blank it should click on a particular element on the webpage and then insert the subsequent data in the webpage for row 3 and after the operation it should continue the activity “For each row”.
@kirti.iyer I have an issue, the condition that we have given it says for row(0+1), so the bot always takes value of 1 row , whereas it should go for the row next to the current row. Lets say i+1 row , where i is the current row. How can I do that ?
@Aditya_Bhalerao For that you can do one thing lets say your data table variable is dt
so first of all you can find the index of current row using dt.rows.indexof(row) and save it in a variable rowindex so when you want next row so you can put condition in if activity stating row(rowindex+1).tostring<>“” and then in the then section click on the web page.
Your rowindex variable is of type string Make it int32 another thing you have to do is you have to assign that value inside for each row. your row inside that bracket is row of for each row.
There is also another issue that i am facing which is , after jumping on to the next row and doing its operation (Which we discussed earlier), the bot repeats the row (as For each row activity is being used), is there any other way we could skip or jump to the next row.
Refer above image, using each row activity row no. 2 has be worked with, the based on the condition the bot worked with row no.3 , now by default the bot will again work with row no.3, (But row no.3 has already been used for data input activity). Now I want the bot to skip to row no. 4 to do the assigned activity.
For jumping the next row or how much row you want to skip can you just try to use Counter, assign the value to it accordingly and tell me if it working or not.
Hi @mozahra
As we are checking data row by row so when our workflow will check the last row it will pop up an error thats why i have taken an condition in if.
Hello I am would like to get text for each company and put it in a row for each company with safety details plus getting text from the safety and insurance tables and write them in an excel in each company row and repeat the process for each company then onto the next company I will be very grateful.
Hi @Aditya_Bhalerao - I’m having the same issue and it seems that your code works. Is it possible to share some of the screenshots of your code for me to try it also? Thank you in advance