Hello Community,
I have one excel file and that file work as input data in REFramework. I want to only use unique values and skip duplicate values of BO Id column and I have to send mail based on that row values to particular users.
Thanks & Regards,
Ronak Patel.
Anil_G
(Anil Gorthi)
November 17, 2023, 4:37am
2
@ronak.patel
you can skip duplicates by using this in assign and then use datatable in your ref where you have only unique values which you can use to send email
dt = dt.AsEnumerable.GroupBy(function(x) x("Bo Id").ToString).Select(function(x) x.First).CopyToDataTable
cheers
sanjay3
(Sanjay)
November 17, 2023, 4:48am
3
Hi @ronak.patel
Use assign activity before reading the dt
You can try this in assign
uniqueData = inputData.AsEnumerable()
.GroupBy(row = > row.Field(“BO Id”))
.Select(group = > group.First())
.CopyToDataTable();
Hope this helps
Anil_G
(Anil Gorthi)
November 17, 2023, 4:50am
5
@ronak.patel
As per error dt is empty…please check the filter you are using…may be it is filtering all the rows
cheers
@ronak.patel
after the generate datatabel activity check whether the dt has data or not
and also check any duplicate variables are present with the same name
use can check with this condition
DT.rows.count
later use this in assign activity
dt1.AsEnumerable.GroupBy(Function(a) a(2).ToString).Select(Function(grp) grp.First).copytodatatable
you can also try this by using column index
Hi @ronak.patel
you can use Remove Duplicate activity and provide the range and specify the columns you want to compare
@Gayathri_Mk
This is REFramework project. so, I can not use remove duplicates and I want to skip duplicate values not delete that values.
Anil_G
(Anil Gorthi)
November 17, 2023, 8:23am
9
@ronak.patel
did you happen to check dt?
cheers
yes. I had check it but…
"dt = dt.AsEnumerable.GroupBy(function(x) x(“Bo Id”).ToString).Select(function(x) x.First).CopyToDataTable "
Not working.
Anil_G
(Anil Gorthi)
November 17, 2023, 8:35am
11
@ronak.patel
Can you please tell what si not working…
and as per error previously shared looks like dt is empty please check the same
cheers
How to find unique values by in_TransactionItem (REFramework) and which condition can use in IF for check unique and duplicate for further process?
Anil_G
(Anil Gorthi)
November 17, 2023, 8:53am
13
@ronak.patel
I hope your transactionitem is datarow
you can save the bo id into a separate variable adn check if bo id is already processed or not
in_Transactionitem(“Bo Id”).ToString will give the id and you can store it to string variable and concatenate all the values or store in list and append items to list…so if bo id exists already then you can ignore
cheers