Flowchart instead of WHILE Loop

Hi,

I actually have a process whereby I need to read an excel file and input data into a website. My process are as follows:

  1. Read Range and store in datatable
  2. Create a WHILE loop
  3. Type Into activities and Click activities inside While Loop

I wanted to know if instead of the While loop we could use a flowchart sequence. Maybe with a counter something like that? Where should we put the Type into activites and so on.

Can anyone help please?

1 Like

Check this. Here datatable variable name is dt1

1 Like

Hi @Yudhisteer_Chintaram1

Why would you use while loop to lopp the data in datatable,we can use for each row activity and also if you want a counter for each row activity has automatic counter mechanism built in.

image

Yes, I know the For Each. I just don’t want to use any loop.

Hey thanks man!!!
I also wanted to know what is the different between

dt1(count)(“column1”).ToString

and

dt1.Rows(count)(“column1”).ToString
?

I don’t think it’s possible because we are using click and type activities…may be someone will answer this if possible…thanks

I think @Surya_Narayana_Korivipadu just did it

I thought you don’t want any loops at all ,even this is some kind of loop.

1 Like

No, I meant the For Loop, While loop.
I didn’t explain well I think.

A much better overall solution would be to load the data from the spreadsheet into a queue, then use a workflow to loop through the items in the queue. That way if there’s an error while processing one of the records, when you rerun the automation it won’t reprocess the ones that were already done.

And you don’t use a counter with workflows. You use a workflow decision. Basically your logic would be “are there more records to process” and the true line makes it loop back to do the next one while the false line goes to a finish sequence (or nowhere so it just ends).

1 Like

I didn’t observe any difference between these two. May be they are accessing data table as two dimensional arrays. But I always use dt1.Rows(RowNumber).item(ColumnNumberOrColumnName) , as these are standard methods of data table objects.

1 Like

Okay thanks! Will do that way then!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.