How to create a bot in ui path in which i have one excel sheet with columns id,Name,Groupid. And groupid column is dynamic column which has Groupid1,Groupid2,Groupid3.How to fetch all group id's columns in one string

how to create a bot in ui path in which i have one excel sheet with columns id,Name,Groupid. And groupid column is dynamic column which has Groupid1,Groupid2,Groupid3.How to fetch all group id’s columns in one string

Hi @A.R_Shravani

Welcome to the Community!

Assuming you just want all the group id’s in a string variable.
input> Excel File
output >AllGroups=“Group1,Group2,Group3”.
You can first use a read Range activity, read the whole data
Use Filter DataTable Activity> Output Columns> “Group Id”
Use Remove Duplicate Rows Activity.
Assign AllGroups=“”
Use For each row in DataTable activity:
assign AllGroups=AllGroups+“,”+CurrentRow(“Group Id”).toString

outside the loop
Assign Allgroups=Allgroups.Trim(" ,".ToCharArray)

you would be able to get all the group ids in a string variable.

Thanks
Happy Automation! :smiley:

Hi @adiijaiin

I have followed your steps, and if my GropuId column should concate as single string.

For example: if i have (groupid1=A,groupid2=B,groupid3=C) then under combinedgroupid value has to be “A,B,C”

As i am new to Ui path i couldn’t get it. Following your steps my output is as below which repeatedly combines values of all group ids with previous row data.I would like to get only current row groupids to be combined

Sorry I made it way to difficult for you
Simple solution:
Use Read Range : DTRecords
Add Data Column “AllGroupIDs” to DTRecords
loop through all the data using For Each Row in DataTable: DTRecords
assign CurrentRow(“AllGroupIDs”)=CurrentRow(“Group_Id1”).toString+“,”+CurrentRow(“Group_Id2”).toString+“,”+CurrentRow(“Group_Id3”).toString

Exit loop
write range DTRecords in excel.

This would suffice your requirements
For eg: for row1 = A1,BB1,CC2
for row2=A2,BB2,CC4
and so on

Thanks

Thank you @adiijaiin ,will try your solution :smiley: