DataTable Manipulation For below table

I have input datatable as below. I will have to groupby based on Roll No and put Term No for each row based on the group.

Could someone share the linq query please.

Input:

INp

OutPut:

OUp

@ppr Hope you can help me with this too.

thanks in advance.

@Praveen_Erakkingal

@Sugumar8785
Was a quick shot, give a try
Sugumar8785.xaml (7.8 KB)

3 Likes

@ppr Thanks a lot for a quick reply. You are my life saver now :slight_smile:

That worked. I implemented in my workflow as required. May I tag you for further queries in case I couldnt get it?

@Sugumar8785
Sure you can request me, but create always a public topic. So we can avoid delays as other members can step in in case of delays from my side

1 Like

@ppr Sure, Thanks a lot.

@ppr Hey Peter, How can I add orderby into the group based on a particular column?

Lets say fees to be ordered by ascending into the same group.

@Sugumar8785
replace the ga line with following and give a try
Let ga = grp.OrderBy(Function ( r ) CInt(r(2).toString)).Select(Function (g, index) g.ItemArray.Concat({index + 1}).toArray).toArray

1 Like

@ppr Thank you. Please suggest some websites to learn these advanced linq expressions.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.