I have an issue I m using grouping decisions number then once finished the loop it doesnt continue to the next decisionsnumber.
Example of the flow:
Assign Groups = dt_check.AsEnumerable().
GroupBy(Function(r) r(“7-N° Décision”).ToString.Trim).Distinct().
ToList()
variable type => List IGrouping System String, system Datatable
Then For each grp in Groups
Inside the for ecah grp in groups I’ve put a
For each rowdecision in grp (Argument type System.Data.DataRow)
And it works It input the correct number of rows for a unique 7-N° Décision.
However when it finish the loop then he must continue to the next rows that have another 7-N° Décision in it but its not the case. Instead he tried to proceed the next row.
Example of info in my Excel file
I want that he proceed all the first 2 rows together then once finished the loop he must start again to the next uniqueNDecision which is row 3 (then proceding all the 4 rows together) then he must continue to the row 7
Just a precision after my loop is finished it always start again to the first row it doesnt continue to the next grp weird . Your precious help would be much appreciated. I think I’m almost there but need help thx.
Now I got a list of string with all the unique “groups”, then I would loop that list of groups. And for each group I would take a subset of the original datatable and loop through that, This way I find it easier to debug and see what is has found as result.
Assign activity with a datatable variable and this as the value (“currentGroup” is the list item):
Also note that at the beginning of my bot I have a for each row in dt_check set up
and then I add a if condition => Row.item(“21-A Factuer O/N”).ToString>“0” andAlso (String.IsNullOrWhiteSpace(Row(“14-Interruption Mandat”).ToString) OrElse CDate(Row.Item(“14-Interruption Mandat”).ToString) > New DateTime(Now.Year, Now.Month, 1).AddMonths(-1).AddDays(-1))
Then I use for each grp in groups (System.Linq.IGrouping<System.String.SystemData.Dat Row)
Then I use for each rowDecision in grp (system.Data.DataRow)
Hope this can help me found why it always restart at row 1 starting for each grp in groups