Workflow keeps looping

Hi, I’ve been doing the Accademy Practical Exam. The workflow does everything right except for keep looping and writing in the excel output file the same rows, and i can’t understand where it’s looping:sweat_smile:. I’ve zipped the project, can someone help me explain where it’s looping? Don’t want the solution just someone to explain where the workflow goes back and do the same thing again. Thanks!
(link moderated)

Hi @Mustafa_Hamed,
Please do the debugging and check where the problem occurs. Give us a little more information so it will be easier to help. We are here to help you but pasting whole projects to the forum is not the perfect approach.

Please have a look here:

1 Like

Ok so i got to this point and i get this error in the GetTransactionData.

That error message means that you are trying to use an argument or variable hasnt been declared.
Look in your arguments / variables to check you dont have duplicate and also that something has been passed in correctly with data.

1 Like

OK so i’ve checked the variables and arguments and they are all declared and don’t have duplicates. My main goal is to check if an element exists(a number of a page) and if exists create a datatable variable (ExtractedDataTable) put the number of the page inside this datatable then pass it to out_TransactionItem. l’ll allegate the screenshots to be more understandable.

Attach Browser and check the element

if statements

variables and arguments

I feel it may be your ExtractDataTable - where is that generated from?

If you run it in debug, it should fall over where the object isnt set correctly

1 Like

I’ve created as a variable. Can’t i do that?

Where / How are you adding data to ExtractDataTable variable?

That’s not doin’ it?(just a rookie here have some patience with me please:upside_down_face:)

No problem :slight_smile: All learning at one point or another haha.
So in_transactionNumber is a integer value i.e. 3

As your creating a new datatable, it has no structure (Columns) so you cant simply assign your integer into the datatable.

What is your content of ExtractDataTable?

Currently your expression will simply return - System.Data.DataRow

You have to access a datatable by identifying the Row number and Column Index / Name.

I.e. ExtractDataTable.Rows(0).Item(“ColumnA”).ToString

1 Like

ok thank you very much i’ll try and let you know :slightly_smiling_face:

1 Like