How to continue with the next row once the previous record is already existed

Hi Team,

Bot has to login to an application and click the required option then enter an ID to check if the details existed or not, if the details already existed then type the next record which is in line and fill the details, do this untill the record in excel finishes. Please help me to achieve this

Hey @bhanu.priya2 try with text exists or else you can use get text and then use if condition for eq - string.isnull or empty(yourvariable) so that way you can check if then value is empty then do the further steps or else continue for the other data.

cheers

Hello,

Thanks for your reply, i am also confused how to use loops?
do i have to use for each and inside do i have to use while loop?
can you please brief it? Thanks in advance.

say i login to an application then read excel, use for each to fetch the first record from excel then use if condition to check whether the record exist…then if the record doesn’t exist then i have to fetch the next row from excel this continues till the records are done… so read excel should be inside for each is it? and after if condition do i have to use while inside for each? to fecth the next rows untill the records are done reading ?

open the application login then read data save into output use for each row inside the for each use get text and after use 1 if condition then if the condition true fill else continue
PS- Note login is one time so thats why first open browser session is outside from the loop data entering from the excel goes under the loop section.
cheers

Okay got it, thank you and do I have to use while by any chance inside the for each?

Hi @bhanu.priya2

Your query is quite confusing. Could you be more specific.

Hi @bhanu.priya2
Step 1: Read the data from the excel and store it in a datatable variable
Step 2: Use for each row (datatable) and use check app state activity to login if login page appears .
Step 3: Type into row(“ID”) and use a Check app state again to check record existed carry out necessary and done.

Hope this helps!

@bhanu.priya2 no you don’t need to use while activity.

@bhanu.priya2 ,

Follow below steps,

1.Login your application
2.Read your excel by using read range activity.
3.Use for each row in data table activity to loop all records in your excel
4.Current row will give you one by one row
5.Use current row to get your ID
6.Enter that ID in your application
7.Use check app state activity to find whether details are existed or not
8.In then branch implement your steps to fill the details and in Else branch just print one log message for reference

Hope it will works!!

happy automation