How to get subdata of a row

Hello guys,

I have an excel below,

So for first “ID NO” column i want to get the data data from “Member” & “Premium” column.

eg :-

For First ID no - 5522

I want to get member Names “RAJ ,RAJ 2, RAJ 3” in one variable
and the corresponding premium “6641.84, 30, 20” in one variable

Could you share this sample excel file ?

Sample Data.zip (10.7 KB)

@Gokul_Murali

To achieve this,

you can follow below steps

  1. Read your excel
  2. create
  3. use loop
  4. inside loop get ID No and check for Member column is blank or not if its not blank use store the member values in list or any dictionary. in dictionary you can use you ID as key and in value section use array and add you member values to that array.
    note if Member column is blank then only create new item untill use same ID No untill you Member column is blank

Hi @Gokul_Murali ,
Please use below syntax
Member

string.join(",",(From row In dtInput.AsEnumerable() Group row By ID = row("ID NO").ToString() Into Group Let firstRow = Group.First() Let Members = String.Join(",", Group.Select(Function(r) r("Member").ToString()).Where(Function(s) Not String.IsNullOrWhiteSpace(s))) Select Members))

Premium

string.join(",",(From row In dtInput.AsEnumerable() Group row By ID = row("ID NO").ToString() Into Group Let firstRow = Group.First() Let Members = String.Join(",", Group.Select(Function(r) r("Premium").ToString()).Where(Function(s) Not String.IsNullOrWhiteSpace(s))) Select Members))

Regards,
Arivu

Hi @arivu96

Iam getting the data but in a single run iam getting all the details in the column.

I want to get details for first “ID NO” the process it add remarks then to get details of second id

i didt get it can you give some example

So in RPA how it will process (RE FRAMEWORK).

  1. it will take first “ID NO”
  2. Process it.
  3. It will go to next “ID NO”

when i ran this expression iam getting all the data at once.

I need to get member details for each transaction not at once.

Hello @Gokul_Murali

I have created a Xaml as per your requirement and i have also tested my workflow, below is the screenshot of output i got :backhand_index_pointing_down:

Here’s the zip of Xaml, do mark it as solution if it helps you.
Get_Subdata.zip (14.3 KB)

Cheers!!!

@darshit.patel

Iam getting the Output but in the 0 transaction number it is taking the first “ID NO”
and retrieving all the details.

i need like for 0th transaction it should pull the first “ID NO” details and for 1st “ID NO” it should pull the second “ID NO” details.

Eg :
For first “ID NO”
Processing Transaction Number: 0

Samah Mohamed Elfatih,Tokio,Berlin
6641.84,20,30

Processing Transaction Number: 1
For second “ID NO”
USA,INDIA,AUS
40,50,60

ok, let me explain,
so i have implemented this logic in a normal sequence
while, you are using RE Framework.
so you have to implement this logic in RE Framework

Regards,