For Each Row in Datatable, and within the loop use an If to check the value of CurrentRow(“Error”).ToString, in the Then block put an “add to collection” activity to add CurrentRow(“FileName”).ToString to the array.
Once the loop completes your array will have a list of the files with an error. You could pass it to another process by writing it to a text file, into an asset, a file in a Storage Bucket, etc.
Read your excel file using Read Range activity and create a variable for output, Let say it is dt_Data
Now use Filter Datatable activity and put a condition of Error = “TRUE”
This will filter your datatable all rows to TRUE
Now use ForEach row activity to loop into the filtered Datatable
Inside that use Assign activity and write as strFileName = CurrentRow(“FileName”).ToString
That won’t work. This will result in only the last filename being stored in the strFileName variable. CurrentRow(“FileName”) should be added to an array/list not to a string variable.