How to use for loop in my situation

above my pic is my sequence. Digitize Document activity i mention particular document path but i need to mention folder do process in all file in side the folder.

Thank you.

Hi @MD_Farhan1

Use For Each file in Folder and give the folder path and keep the activities from Digitize Document activities inside the loop and pass CurrentFile.ToString in Document Path.

Regards

@MD_Farhan1,

Use For Each File in Folder like below and in place of Log message in my code, put your entire code to iterate for each file.

Thanks,
Ashok :slight_smile:

  1. First use assign activity to fetch the files from local directory and store it in the array variable after Load taxonomy
  2. Then use for each activity for Array variable
  3. Inside the loop use digitize document and other activities. In the use the iterative variable name wherever path required

Hi, above method working properly but write data in excel only last extract invoice data only. i want all invoice data to write on excel below attach my screenshot.
then present validation station happen every invoice but i need one validation for all invoice.

Thank you.

@MD_Farhan1,

For this you can declare a datatable variable outside of For Each File activity scope

And inside the loop after extractor add condition like this to merge current document data into previous all documents datatable.

Now to write it into single excel file use write range activity outside of For each file loop and pass dtFinal Datatable which will contain data of all the documents.

Final solution would be like this.

Thanks,
Ashok :slight_smile:

1 Like

you mention DatasetTable what is that? you not declare any variable also pls explain that. thank you.

@MD_Farhan1,

It’s just sample datatable I used to show you how you can add one datatable you will get from extractor and merge it to final one.

You can put your Output_DataSet.Tables at that place.
image

Thanks,
Ashok :slight_smile:

1 Like

Thank you for your supporting bro. :+1:

1 Like

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