Is there a way to get the result of ‘After’ as above?
CountIncrementForum.zip (18.0 KB)
Hey sumouse,
Please check this workflow this may help you
Regards…
3 Likes
@sumouse
in general we can handle by grouping the data
here we also have the choice on Non-LINQ, LINQ approaches
In addition to above mentioned suggestions find below a LINQ Approach:
- (DataTable Reconstruction, Indexed Select, Tuple, Origin Position Ordering…)
With some modified test case we also showcasing the correct group numbering and origin position keeping)
(From d In dtData.AsEnumerable
Group d By k=d("Name").toString.Trim Into grp=Group
From t In grp.Select(Function (x, i) Tuple.Create(x,i+1))
Let ra = t.Item1.ItemArray.Take(t.Item1.ItemArray.Length - 1).Append(t.Item2).ToArray
Order By dtData.Rows.IndexOf(t.Item1)
Select r = dtResult.Rows.Add(ra)).CopyToDataTable
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.