I’m trying to get count of rows in log message but i don’t know how to do that
Hey @yash_p,
You can get the count using Datatable.Count functionality.
Can you please show us the screenshot? so that we can have more clarity on the same.
You can get the current row which is going on and then you can minus the same from Datatable.Count number. And you will get the actual number.
See the below expression.
(Cint(Datatable.Count) - Cint(DataTable.Rows.IndexOf(row))).ToString
Thanks!
You can add one additional column named Status to your input file. If the record processed successfully then update status as either successful or Failed. And then use below query to find how many are processed.
ProcessedRecordsCount = dtInput.AsEnumerable().Where(Function(row) Not String.IsNullOrEmpty(row("Status").ToString.Trim)).CopyToDataTable.Rows.Count
UnprocessedRecordsCount = dtInput.Rows.Count - ProcessedRecordsCount
Here both ProcessedRecordsCount and UnprocessedRecordsCount variables are of type Integers.
HI @yash_p
Generally for getting count of row these steps will be usefull
- Read Range and create a output variable Eg: DT
- Log message and pass as DT.Rows.Count (This will get you the whole row count)
If you want like completed or not you should need a difference in the both the rows like the excel should contain a column called status and the status should be mentioned there
If the status is there you can try this
-
Read Range
-
Filter Datatable and in filter wizard you should give filteration like “Column Name” Contains “Completed” and save in one variable
-
Get the completed status count like i mentioned above your new var.Rows.Count
-
Filter Datatable and in filter wizard you should give filteration like “Column Name” IsEmpty and save in one variable
-
Get the completed status count like i mentioned above your new var.Rows.Count
Hope this Helps
Regards
Sudharsan
it is visible in orchestrator
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.