Get "Limit" value from the datatable based on the lookup in the "Group" column, peer group name comes from the Queue

Get “Limit” value from the datatable based on the lookup in the “Group” column, peer group name comes from the Queue

Group	 Limit
Facbook 	90
Google	360
Wipro	765
Infosys	45
Dell	4654
HP	89

Thanks in Advance.

Hi @Manju_Reddy_Kanughula

Try this:

peerGroupName = in_Transaction.SpecificContent("PeerGroupName").ToString()

limit = Convert.ToInt32(dt.AsEnumerable().Where(Function(row) row.Field(Of String)("Group") = peerGroupName).Select(Function(row) row.Field(Of Integer)("Limit")).FirstOrDefault())

peerGroupName is of DataType System.String
limit is of dataType System.Int32

Hope it helps!!

Hi @Manju_Reddy_Kanughula,

Here is sample code you can refer and change as per requirement.

Select Query:

dtInput.Select("[Group]='"+strInputFromQueueVariable+"'").CopyToDataTable.Rows(0)("Limit").ToString

image

Thanks,
Ashok :slight_smile:

It is throwing error as below .

image

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