I’m trying to divide a list of 100 row into 3 group 33-33-34.
The condition to attribute to a group is based on the remaining number after dividing by 3. (mod 3)
Leaving the remaining possibilities to 0 ; 1 or 2
Example for the row 77, the remaining is 2 (25*3 + 2).
In the FilterDataTable activity I’m trying to use : CInt(“ColumnName”) mod 3 = 0 ; 1 or 2
But I have the following error : Conversion from string “ColumnName” to type ‘Integer’ is not valid.
(From d in YourDataTableVar.AsEnumerable
Group d by k=CInt(d(YourColNameOrIndex).toString.Trim) Mod 3 into grp=Group
Select t = grp.CopyToDataTable).toList
Sorry, I’m still in the learning process, I am not sure how to do it.
I tried to assign some extra variables to create some conditions and use the IF activity instead of FilterDT but still not working.
Right now I have the following : Main.xaml (10.3 KB)